Apache2与php-fpm error_log设置

时间:2017-04-05 22:08:35

标签: php apache cpanel whm error-log

我的脚本位于home/user/public_html/scrip/sript.php。 我想要的是,当我运行脚本并且存在错误时,要在与脚本相同的位置生成error_log.txt文件。

错误是在所有服务的公共位置生成的,但我想知道是否可以为脚本的特定位置设置此错误。

1 个答案:

答案 0 :(得分:0)

你是从shell运行脚本吗?然后2>会将错误回显给您命名的文件。所以php sript.php 2> sript.err会创建一个错误日志

相关问题