CakePHP shell无限循环

时间:2014-02-25 12:32:21

标签: php ajax shell cakephp infinite-loop

我在控制器(AJAX POST调用)中触发了CakePHP shell命令,然后shell命令进入无限循环。我使用以下代码来打印跟踪。

$dt = debug_backtrace();
$cs = '';
foreach ($dt as $t) {
  $cs .= $t['file'] . ' line ' . $t['line'] . ' function ' . $t['function'] . "()\n";
}
error_log($cs);

我一遍又一遍得到以下结果。

/public_html/lib/Cake/Controller/Controller.php line 490 function invokeArgs()
/public_html/lib/Cake/Routing/Dispatcher.php line 185 function invokeAction()
/public_html/lib/Cake/Routing/Dispatcher.php line 160 function _invoke()
/public_html/app/webroot/index.php line 108 function dispatch()

我还将console.log放入前端ajax,而ajax调用只运行一次。由于某种原因,cakePHP一次又一次地重复ajax调用。

我已经为此工作了一天,我不知道如何解决这个问题。我使用CakePHP 2.4.5,PHP 5.4.24

请帮助我!

提前致谢!

0 个答案:

没有答案