PHP asynchronous debugging and online debugging of Web programs _php tutorial

Source: Internet
Author: User

PHP asynchronous debugging and online debugging methods for Web programs


What do you do when you encounter a site that needs to run uninterrupted, but you need to debug the site's program errors? Is it a bit of experience to guess, or just print the error message to get it out on the page?

Below to share a method to meet both of these conditions, both to facilitate the site program error debugging, and do not affect the normal operation of the site debugging methods. Copy the following PHP statement to the top of the common code.

Ini_set (' error_reporting ', E_all ^ e_notice);//Displays all error messages except NOTICE type Ini_set (' error_reporting ', e_all);// Displays all error messages Ini_set (' display_errors ', off);//Disables the output of error messages to the output ini_set (' Log_errors ', on);//Turn On Error logging Ini_set (' error_log ', ' C :/phpernote ');//define error log storage location

Additionally, two more commonly used PHP statements to troubleshoot error messages are added:

@ini_set (' Memory_limit ', ' 500M ');//Setup can occupy maximum memory of 500mb@ini_set (' max_execution_time ', ' 180 ');//Set allow maximum execution time of 180 seconds

Articles you may be interested in

    • Compress website js and CSS files using PHP's gzip compression to speed up website access
    • PHP Crawl Web site pictures of the program
    • How PHP can turn on compressed output to website to enhance website access speed
    • A PHP classic tutorial book recommended for beginners in PHP
    • PHP Extract the birthday date from the ID number and the function to verify whether it is a minor
    • Javascript asynchronous load, improve the browsing speed of the Web page
    • PHP uses Curl Functions to crawl Web pages and download files in multiple threads
    • Talking about how to reduce the website bounce rate effectively and improve the conversion rate

http://www.bkjia.com/PHPjc/868584.html www.bkjia.com true http://www.bkjia.com/PHPjc/868584.html techarticle php asynchronous debugging and online debugging methods when a site needs to run uninterrupted, but also need to debug the site of the program error, how to do it? Is by experience a ...

  • 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.