0

我有一个运行 apache、php 的 OS X 10.6 服务器。我安装了 CronniX 来帮助我管理我的 cron 作业。我有一个这样的 php 脚本:

<?
ini_set('display_errors', 1);
$a = array('a', 'b', 'c');
foreach ($a as $v):
echo $v;
?>

如您所见,该endforeach;命令丢失,但 cron 输出(从 CronniX 任务的选项卡中看到)没有显示任何错误,它只是死了。

这不是一个foreach / endforeach问题{ },没有工作。

当然,在更复杂的脚本中,错误报告对我来说很有价值,没有它就无法调试。

谢谢!

4

1 回答 1

0

I think it has something to do with the fact that it's a parse error. In order to be able to catch parse errors you would need to append the php file

php_value auto_prepend_file /Volumes/dev1/http/auto-prepend.php

and user register_shutdown_function in auto-prepend.php.

于 2012-03-16T08:29:27.423 回答