When I trying to run a file using cron jobs I am getting the following
Parse error: syntax error, unexpected T_STRING in /home/joshand2/public_html/application/models/model_posting.php on line 1787
The line in 1787 is goto endofloop;
I don't know if there is any syntax related issue in this line or not but the endofloop
refers to.
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");
}
Can anybody help me in fixing this error?
You likely need to re-factor your code to avoid using goto
jump labels.
Because: