Php asynchronous debugging and online debugging of website programs

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.