【发布时间】:2013-01-02 13:44:10
【问题描述】:
当我尝试使用 cron 作业运行文件时,我得到以下信息
Parse error: syntax error, unexpected T_STRING in /home/joshand2/public_html/application/models/model_posting.php on line 1787
1787 中的行是goto endofloop; 我不知道这行是否有任何语法相关的问题,但endofloop 指的是。
结束循环:
if (file_exists("cookies/".$this->job_id."_job_".$this->site_id."_site.txt")) {
echo "The file cookies/".$this->job_id."_job_".$this->site_id."_site.txt exists";
unlink("cookies/".$this->job_id."_job_".$this->site_id."_site.txt");
}
谁能帮我解决这个错误?
【问题讨论】:
-
发布更多代码,提供的代码中没有错误
-
可能您使用的 PHP 版本不支持
goto(goto。 imgs.xkcd.com/comics/goto.png -
由 php.net 提供:php.net/manual/en/images/…
-
@DaveRandom - 是否有任何替代关键字代替 goto?
-
@lock 函数。或面向对象编程。
标签: php parse-error