如何在php错误日志中生成/引发php错误
我想看看我的php_error.log文件是否有效,但我不知道如何生成一个将显示在日志文件中的错误 谢谢你的帮助如何在php错误日志中生成/引发php错误,php,error-handling,Php,Error Handling,我想看看我的php_error.log文件是否有效,但我不知道如何生成一个将显示在日志文件中的错误 谢谢你的帮助 ini_set('display_errors',1); error_reporting(E_ALL); echo => 它会产生类似于 Parse error: syntax error, unexpected T_DOUBLE_ARROW in *filename* on line *line number* 它会产生类似于 Parse error: syn
ini_set('display_errors',1);
error_reporting(E_ALL);
echo =>
它会产生类似于
Parse error: syntax error, unexpected T_DOUBLE_ARROW in *filename*
on line *line number*
它会产生类似于
Parse error: syntax error, unexpected T_DOUBLE_ARROW in *filename*
on line *line number*
试用
error_log("I Love error", 0);
请参阅更多文档
尝试使用
error_log("I Love error", 0);
请参阅更多文档
这对我来说很有用:
error_log("This is the error message written to the log", 0);
这对我很有用:
error_log("This is the error message written to the log", 0);