Methods for php asynchronous debugging and online debugging of website programs_PHP tutorial

WBOY
Release: 2016-07-13 10:20:05
Original
869 people have browsed it

Methods for PHP asynchronous debugging and online debugging of website programs

What should you do when you encounter a website that needs to run uninterrupted but also need to debug program errors on the website? What to do? Should I rely on a little guesswork based on experience, or should I directly print the error message and let it be output on the page?

The following is a method that satisfies these two conditions at the same time. It is a debugging method that facilitates website program error debugging without affecting the normal operation of the website. Just copy the following php statement to the top of the public code.

//ini_set('error_reporting',E_ALL ^ E_NOTICE);//显示所有除了notice类型的错误信息
ini_set('error_reporting',E_ALL);//显示所有错误信息
ini_set('display_errors',off);//禁止将错误信息输出到输出端
ini_set('log_errors',On);//开启错误日志记录
ini_set('error_log','C:/phpernote');//定义错误日志存储位置
Copy after login

Attached are two more commonly used PHP statements for eliminating error messages:

@ini_set('memory_limit','500M');//设置程序可占用最大内存为500MB
@ini_set('max_execution_time','180');//设置允许程序最长的执行时间为180秒
Copy after login

Articles you may be interested in

  • Use PHP's GZip compression function to compress website JS and CSS files to speed up website access
  • php captures website images Program
  • How does PHP enable compressed output for a website to enhance website access speed
  • A classic PHP tutorial book recommended for PHP beginners
  • PHP extracts ID number from Birthday date and function to verify whether a minor is a minor
  • Javascript loads asynchronously to improve web browsing speed
  • PHP uses Curl Functions to implement multi-threaded web crawling and file downloading
  • A brief discussion on how to effectively reduce website bounce rate and increase conversion rate

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/868584.htmlTechArticleMethods for PHP asynchronous debugging and online debugging of website programs. When encountering a website that needs to run uninterrupted, but needs What should I do when debugging a program error on this website? It depends on experience...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!