Set PHP debugging and debugphp to output all error messages. debug php and debug php in any environment
Enable php debugging and php debug regardless of the php. ini configuration.
Add it to the first line of the PHP file to be debugged.
Ini_set ('display _ errors ', 1); // error message ini_set ('display _ startup_errors', 1); // php startup error message error_reporting (-1 ); // print out all error messages ini_set ('error _ log', dirname (_ FILE __). '/error_log.txt'); // output error information 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 all error messages Ini_set ('error _ log', dirname (_ FILE _). '/error_log.txt'); // output error information to a text FILE |
Debug php, debug php. ini configuration in the development environment
; Display error message display_errors = On; display php start error message display_startup_errors = On; log record error message log_errors = On
1 2 3 4 5 6 |
; Displays error information Display_errors = On The php start error message is displayed. Display_startup_errors = On ; Log record error information Log_errors = On |