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什么“右括号”?它们全都匹配 –