Home >Backend Development >PHP Problem >What to do if a 500 error page appears in php
The 500 error page in php is because the server is set to not prompt for errors, so if there is a problem with PHP syntax, an error 500 will be prompted. The solution is to add the code "error_reporting(E_ALL);" at the top of the PHP file. .
Recommended: "PHP Video Tutorial"
php Debugging errors in the page (solve php error 500)
error_reporting(E_ALL); ini_set(“display_errors”, 1);
The server is set not to prompt errors, so if there is a problem with PHP syntax, an error 500 will be prompted. The solution is also very simple. Display the error message and paste the above code to the top of the file.
The above is the detailed content of What to do if a 500 error page appears in php. For more information, please follow other related articles on the PHP Chinese website!