【发布时间】:2010-12-17 22:45:24
【问题描述】:
我正在使用 PHP 的 shell_exec 函数在我的服务器上调用 bash 脚本。
shell_exec("bash -x /tesladata/isetools/0-extractbytickerforweb.bash $ticker $isedate > /t24alv2/iseoutput/$ticker-$isedate-$thistime.log &");
现在,我以前从 CGI 脚本(“bash -x...”)运行命令,而且速度更快(即时)。现在,脚本运行(> 10 秒)和生成的页面呈现需要非常缓慢的时间。
任何想法为什么这这么慢?我仍然想从 PHP 而不是 CGI 运行 bash 脚本,因为我的整个站点都被转换为 PHP。也许另一个功能更合适?任何想法将不胜感激。
【问题讨论】:
标签: php bash shell shell-exec