2012-03-29 64 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);