Windows system switch PHP error prompt
If you do not have permission to modify php.ini, you can add the following code to the PHP file:
| The code is as follows |
Copy Code |
Ini_set ("Display_errors", "on"); Error_reporting (E_all | E_STRICT); |
Of course, if you can modify the php.ini, as follows:
| The code is as follows |
Copy Code |
Find display_errors = on modified to Display_errors = Off Note: If you have copied the php.ini file to the Windows directory, you must also modify the Display_errors = on in C:windows/php.ini to Display_errors = Off Solution of display_errors = off failure in PHP. ini |
In the Linux system to turn on and off error hint method is similar, but I would like to introduce a specific
Linux system under
1. Open the php.ini file.
Take my Ubuntu example, this file is in:/etc/php5/apache2 directory.
2. Search and modify the downlink, change the off value to on
| The code is as follows |
Copy Code |
| Display_errors = Off |
3. Search Downlink
| The code is as follows |
Copy Code |
error_reporting = E_all & ~e_notice or search: error_reporting = E_all & ~e_deprecated Amended to error_reporting = E_all | E_strict |
4. Modify Apache's httpd.conf,
Take my Ubuntu example, this file is in the:/etc/apache2/directory, this is a blank file.
Add the following two lines:
| The code is as follows |
Copy Code |
Php_flag display_errors on Php_value error_reporting 2039 |
5. Restart Apache, OK.
Reboot command::
| code is as follows |
copy code |
sudo/etc/ Init.d/apache2 Restart |