Php asynchronous debugging and online debugging of website programs
What should I do when a website needs to run continuously but debugging program errors of the website? Is it based on experience or simply printing error messages for them to output on the page?
Below we will share a debugging method that meets both of these conditions to facilitate website program error debugging without affecting the normal operation of the website. Copy the following php statement to the top of the public code.
// Ini_set ('error _ report', E_ALL ^ E_NOTICE); // display all ini_set ('error _ report', E_ALL) error messages except the notice type ); // display all error messages ini_set ('display _ errors ', off); // disable the output of error messages to the output end ini_set ('Log _ errors', On ); // enable the error log record ini_set ('error _ log', 'c:/phpernote'); // define the storage location of the error log
In addition, add two commonly used PHP statements for troubleshooting error messages:
@ Ini_set ('memory _ limit ', '500m'); // sets the maximum memory occupied by the program to 180 MB @ ini_set ('max _ execution_time', '123 '); // set the maximum execution time of the program to 180 seconds
Articles you may be interested in
- Use the GZip compression function of PHP to compress website JS and CSS files to accelerate Website access.
- Php program for capturing website Images
- How does PHP enable compression and output for websites to increase website access speed?
- A classic php tutorial book recommended for php beginners
- Php extracts the birthday date from the ID card number and verifies whether it is a minor.
- Javascript asynchronous loading improves the browsing speed of web pages
- PHP uses Curl Functions to capture webpages and download files with multiple threads
- How to effectively reduce the bounce rate and increase the conversion rate