2012-03-29 59 views

回答

0
ini_set('display_errors',1); 
error_reporting(E_ALL);  
echo => 

会造成错误,如

Parse error: syntax error, unexpected T_DOUBLE_ARROW in *filename* 
on line *line number* 
3
<?php 
asd(); 
?> 

保存这个并将其作为网页

错误应该像

[Thu Mar 29 10:28:41 2012] [error] [client 106.132.155.92] PHP Fatal error: Call to undefined function asd() in * on line 2 
[Thu Mar 29 10:28:41 2012] [error] [client 106.132.155.92] PHP Stack trace: 
[Thu Mar 29 10:28:41 2012] [error] [client 106.132.155.92] PHP 1. {main}() *:0 
0

这个工作对我来说:

error_log("This is the error message written to the log", 0);