PHP error_log: Won't write to specified file

微笑、不失礼 提交于 2019-12-06 03:57:21

Have you tried in the php file itself?

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', "c:/php5/log/php.log");

Update: The problem is that you are using a bitwise AND where you should use a bitwise OR

Try this

var_dump(E_ALL);
var_dump(E_STRICT);
var_dump(E_ALL | E_STRICT);
var_dump(E_ALL & E_STRICT);

output: int(6143) int(2048) int(8191) int(0)

So basically you are writing

error_reporting  =  0

Effectively turning off the error reporting. Change the & for an | in your php.ini and you should be ok.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!