我確定這是一件非常簡單的事情,但我在下面的代碼中遇到了一個unexpected T_DOUBLE_ARROW
語法錯誤。有人可以幫我解決拍攝問題嗎?我的php代碼中意外的T_DOUBLE_ARROW錯誤
感謝
奧蘇
// Set timezone
date_default_timezone_set('Australia/Melbourne');
// Set timestamps to compare
$tts = date('Y-m-d h:i:s'); // Today's timestamp
$fts = '2014-29-01 12:00:00'; // Final 'end' timestamp
$fts24 = '2014-28-01 12:00:00'; // Last 24 hours timestamp
// Set conditions
$show24 = false;
$show = false;
// $tts must be between $fts24 and $fts
if($tts => $fts24 && $tts =< $fts) {
$show24 = true;
}
// $show24 must be false (don't show last 24 hours banner) and $tts must be before $fts
if($show24 == false && $tts =< $fts) {
$show = true;
}
// Show either general or last 24hrs banner
if($show24) : ?>
<a href="#url1" id="banner">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/image24.jpg" alt="image" width="500" height="62" />
</a>
<?php elseif($show): ?>
<a href="#url2" id="banner">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/image.jpg" alt="image" width="500" height="62" />
</a>
<?php endif; ?>
'=>'無效。改用'> ='代替。 –
最小理解近義詞怎麼了?感覺受傷了嗎? –
好奇,低調投票我假設,因爲這對你來說太簡單了? – Osu