我error_log在 php.ini 文件中配置了指令,如下所示:
error_log = /path/to/logs/error_log
Run Code Online (Sandbox Code Playgroud)
然后,我配置了这样的error_reporting指令:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
Run Code Online (Sandbox Code Playgroud)
当我检查 error_log 文件时,我看到正常的 php 警告/错误文本行:
[03-Jun-2015 08:39:00 America/Bogota] PHP Notice: Undefined index: cerrar in /fake/path/to/file2.php on line 68
[03-Jun-2015 08:40:49 America/Bogota] PHP Notice: Undefined index: in /fake/path/to/file2.php on line 344
Run Code Online (Sandbox Code Playgroud)
问题是:有没有办法改变输出格式?我的意思是,如果我可以打印,例如,导致警告的 IP 和子域。
我在 StackOverflow 和 Google 中寻找,但没有找到明确的信息或示例。
非常感谢您的帮助。
php ×1