1. Modify php.ini
error_reporting = E_ALL & ~E_NOTICE register_globals = On
This problem actually mainly lies in the parameters of error_reporting. The author below register_globals in php.ini It was not found (the author is using php7), and there is no problem if I don’t add it.
2. Add the following code to the head of the php file
ini_set("error_reporting","E_ALL & ~E_NOTICE");
This solution is suitable for situations where you do not have read and write permissions for php.ini or do not want to configure ini. It can also be used Solve the problem.
Recommended tutorial: IIS tutorial
The above is the detailed content of iis running php500 error. For more information, please follow other related articles on the PHP Chinese website!