【发布时间】:2013-01-01 23:38:43
【问题描述】:
我有以下基本代码:
<?php
//http://localhost/error_log.php
echo "write to the error_log";
error_log("error_log entry");
//error_log("error_log entry",0);
?>
当我导航到此页面时,我在浏览器中看到write to the error_log。它甚至出现在 access_log /var/log/apache2/access.log。
[my ip here] - - [18/Jan/2013:09:18:54 +0000] "GET /error_log.php HTTP/1.1" 200 314 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11"
但是当我检查 error_log (即/var/log/apache2/error.log)时,我看不到任何一个 error_log 消息。
为什么这些没有被输入到 error_log 中?
【问题讨论】:
-
行为取决于
error_log配置指令的设置。ini_get('error_log')说什么?
标签: php error-handling error-logging error-log