Debug php,debug php in any environment
PHP Debug is enabled in the case of PHP debugging, regardless of the php.ini configuration.
Add in the first line of the PHP file you need to debug.
Ini_set (' display_errors ', 1); Error message Ini_set (' display_startup_errors ', 1); PHP Startup error Message error_reporting (-1); Print out all the error messages Ini_set (' Error_log ', DirName (__file__). '/error_log.txt '); Output error message to a text file
|
1
2
3
4 |
Ini_set (' display_errors ', 1); Error message
Ini_set (' display_startup_errors ', 1); PHP Startup error message
Error_reporting (-1); Print out all the error messages
Ini_set (' Error_log ', DirName (__file__). '/error_log.txt '); Output error message to a text file |
Development environment Debug Php,debug PHP php.ini Configuration
; Display error message display_errors = on; display PHP start error message display_startup_errors = On; logging error message Log_errors = On
|
1
2
3
4
5
6 |
; Display error message
Display_errors = On
; Display PHP start error message
Display_startup_errors = On
; Logging error messages
Log_errors = On |