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:
- ; Examples:
- ;-Show all errors, tables T for notices and coding standards warnings
- ; Error_reporting = e_all &~ E_notice
- ;-Show all errors, except t for notices
- ; Error_reporting = e_all &~ E_notice | e_strict
- ;-Show only errors
- ; Error_reporting = e_compile_error | e_recoverable_error | e_error | e_core_error
- ;-Show all errors tables T for notices and coding standards warnings
- ; 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:
- // Disable error reporting
- Error_reporting (0 );
- // Report running errors
- Error_reporting (e_error | e_warning | e_parse );
- // Report all errors
- Error_reporting (e_all );
-
Then you can include the following in the include/common. inc. php file in the forum:
- Error_reporting (0 );
- To:
- 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.
- Phpinfo ();
- ?>
|