PHP program errors include syntax errors, runtime errors, and logic errors. If the PHP script does not report a syntax error, why:
1. in a general integrated environment, error reports are enabled by default. However, in a linux system, installation using a software package is not required,
Now you can view the PHP configuration file and open the error report =>
The code is as follows:
Display_errors = On/* PHP configuration file path:/uer/local/php/etc/php. ini */
Note:
How to dynamically set the PHP. ini configuration file in the php script=>
The code is as follows:
Ini_set ('display _ errors ', 'on');/* display All errors */
2. set the error report level=>
The code is as follows:
Error_reporting = E_ALL;/* The strictest error reporting level, which can be enabled during development */
Error_reporting = E_ALL &~ E_NOTICE/* errors other than notice */
Error_reporting = E_ERROR | E_PARSE | e_CORE_ERROR/* only critical runtime errors, new parsing errors, and core errors are considered */
The above three types are recommended.
Note:How to dynamically set the error report level in the PHP script=>
The code is as follows:
Error_reporting (E_ALL &~ E_NOTICE );
3. after the configuration file is changed, the service must be restarted to take effect.=>
Apache startup:/usr/local/apache2/bin/apachectl start/* recommended */
In addition, the Red Hat Linux private startup command: service httpd start
Restart Apache:/usr/local/apache2/bin/apachectl restart
In addition, the Red Hat exclusive startup command: service httpd restart
Stop Apache:/usr/local/apache2/bin/apachectl stop
In addition, the Red Hat exclusive startup command: service httpd stop
Restart Nginx:/usr/local/nginx/sbin/nginx-s reload/* smooth restart */