2 日以来、追加されたプロモーションの有効期限を今日の日付と比較する条件を追加しようとしています。有効期限が切れている場合は、プロモーションのテキストに「プロモーションの有効期限が切れました..」と表示したいと思います。
だから、このようなもの:
$today = date( "Y-m-d" );
<div class="main-news-content" <?php if( [xfvalue_expiration] < $today ){ die "this promo is expired" ;}?>>
{short-story limit="300"}<div style="clear: both;"></div>
<div class="main-news-line"></div>
<div class="infocoupon">
<b>Ajouter : </b> {date} | [xfgiven_expiration] <b>Date D'expiration :</b> <span class="blink">[xfvalue_expiration]</span> [/xfgiven_expiration] {rating}
</div>
</div>
しかし、結果はありません!今日の日付を取得するにはどうすればよいですか? datalife は彼女のスクリプトで PHP 条件を受け入れますか? Ps: コードをページ shortstory に追加しました。