我使用WAMP,並在我的php.ini文件我有:PHP錯誤日誌有額外的回車?
error_log = "d:/php_error.log"
當我打開這個文件,我看到:
[26-Jun-2013 05:35:57 UTC] PHP Warning: Division by zero in D:\....
[26-Jun-2013 05:35:57 UTC] PHP Stack trace:
[26-Jun-2013 05:35:57 UTC] PHP 1. {main}() D:\....
[26-Jun-2013 05:35:57 UTC] PHP 2. Zend_Application->run()...
etc
的問題是,有額外的回車。即我期待寧願有這樣的:
[26-Jun-2013 05:35:57 UTC] PHP Warning: Division by zero in D:\....
[26-Jun-2013 05:35:57 UTC] PHP Stack trace:
[26-Jun-2013 05:35:57 UTC] PHP 1. {main}() D:\....
[26-Jun-2013 05:35:57 UTC] PHP 2. Zend_Application->run()...
etc
這是什麼原因造成的?
UPDATE
我改變 「error_append_string」 和 「error_prepend_string」 到 「」。我還檢查和行之後的條目是:
[LINE]CR
CRLF
[LINE]CR
etc
即回車和換行的符號......
你有php.ini中的error_append_string:www.php.net/manual/en/errorfunc.configuration.php?如果是的話,它有什麼價值? – user4035
你用什麼工具打開文件?你可以使用十六進制編輯器來查看行尾字符是什麼? –
我用更多的信息更新了這個問題。 – coderama