好的,所以我的
PHP至少可以说是可怕的.我继承了一个应用程序,并且必须从7年前编写它的人那里修复错误.当我运行页面时,没有返回,所以我检查了日志以查看错误,这是我得到的:
原文链接:https://www.f2er.com/php/139096.htmlPHP Parse error: Syntax error,unexpected ‘=’,expecting ‘,’ or ‘;’ in /httpdocs/cron123/purge.PHP on line 4
这是代码:
<? ob_start(); global $siteRoot = '/httpdocs/'; global $reportRoot = '/reports/'; include('billing1.PHP'); $date='Purge report for: ' .date('M d,Y \a\t g:i a'); ?> <html> <head><title><?=$date?></title></head> <body> <?PHP $account = new billing(); $ftresult = $account->purge(); new dBug($ftresult); echo "successfully wrote"; ?> </body> <? $filename = "purge_report_" . date('y.m.d_\a\t_g_i_a') . ".html"; $loc = $reportRoot . 'purge_reports/'; $f = $loc . $filename; $fp = @fopen($f,'w'); @fwrite($fp,ob_get_contents()); @fclose($fp); ob_end_flush(); ?>