"Tamping PHP Foundation" PHP Development encountered white page debugging method

Source: Internet
Author: User

This article address share outline: 1. Set error error level, display error 2.possible causes of white pages
1. "Set error error level, show error"PHP development, access to the address is also right, but is not out of the page, the display is a white page, so you can judge that there is an error occurred, through the Firebug also did not check out, after the need to go to index.php this entry file, set the error mechanism, this than   PHP.ini, set the priority high because it is more back. Define (' Environment ', ' Dev '); For the development environment, define (' environment ', ' production '); Is the production environment, prohibit all error, remember to develop completely, then change the past

2. "Possible causes of white pages"

After this appearance of white pages, it must be an error is not out, unless the Display page is blank. It could be a couple of things.
A. No errors are set in php.ini
B. The page itself has settings error_reporting (0);
C. Using the @ symbol suppresses the generation of hint errors
D. A framework such as CI, in the system at the entrance file index.php in the production environment or development environment, corresponding to the corresponding error mechanism processing.
E. You can use Firefox's firbug to see the error, in the "console", or "network", see "Response", "HTML" and so on, here
There will also be hints, in addition, to the development of Ajax such as Json,xml, controller and model output can also be seen in these two places.

"Tamping PHP Foundation" PHP Development encountered white page debugging method

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.