0
if(!empty($maintenance_options['disable'])) {
$currentDate = date("Y-m-d H:i:s", strtotime(date("Y-m-d") . date("H:i:s")));
$nodate = $maintenance_options['disable'], strtotime(date("Y-m-d") . date("H:i:s"));
if($currentDate > $nodate) {
echo 'if';
} else {
echo 'else';
}
}
我有這個奇怪的錯誤:PHP的strtotime問題,導致錯誤
Parse error: syntax error, unexpected ',' on line 53
53號線是
$nodate = $maintenance_options['disable'], strtotime(date("Y-m-d") . date("H:i:s"));
,但該行似乎是罰款?它出什麼問題了?
該行是否打算作爲函數調用?分號前有一個額外的右括號。 –
什麼是日期(「Y-m-d」)。日期(「H:我:S」)應該是?如果你只是想要當前時間,使用time()而不是strtotime(date(「Y-m-d」)。date(「H:i:s」)) – Nick
@EduardoGalván什麼「右括號」?它們全都匹配 –