Php page blank what is going on php blank page solution

Source: Internet
Author: User
Tags coding standards php error php error reporting
Php page blank what is going on php blank page solution

When a blank php page appears, how can I view the error message reported by php?

The specific method is as follows:

1. configure php. you can set the php error reporting level in the parameters in the ini file in php. add a row error_reporting = e_all in ini. note: php. ini has some examples, such as local php. ini contains the following code:

  1. ; Examples:
  2. ;-Show all errors, tables T for notices and coding standards warnings
  3. ; Error_reporting = e_all &~ E_notice
  4. ;-Show all errors, except t for notices
  5. ; Error_reporting = e_all &~ E_notice | e_strict
  6. ;-Show only errors
  7. ; Error_reporting = e_compile_error | e_recoverable_error | e_error | e_core_error
  8. ;-Show all errors tables T for notices and coding standards warnings
  9. ; Error_reporting = e_all &~ E_notice

Add error_reporting = e_all under these lines of code and then restart the web service.

2. use the php function error_reporting to set the php error level (applicable to virtual hosts). If you do not have permission to modify the parameter configuration in php. ini, you can use this function to set the error level. Error_reporting () function usage method error_reporting (report_level) if the level parameter is not specified, the current error level will be returned. Any number of the above options can be connected with "or" (or |), so that all required levels of errors can be reported. For example, the following code disables user-defined errors and warnings, performs some operations, and recovers to the original error level:

  1. // Disable error reporting
  2. Error_reporting (0 );
  3. // Report running errors
  4. Error_reporting (e_error | e_warning | e_parse );
  5. // Report all errors
  6. Error_reporting (e_all );

Then you can include the following in the include/common. inc. php file in the forum:

  1. Error_reporting (0 );
  2. To:
  3. Error_reporting (e_all );

Save the file so that you can see the error message reported by php.

Php blank page

1. in iis Manager --> "web service extension" ---> add php extension

2. the php error prompt is blocked. if this error is not displayed, a blank page is displayed. we recommend setting this in php. ini.

  1. Phpinfo ();
  2. ?>

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.