Home  >  Article  >  Backend Development  >  What to do if a 500 error page appears in php

What to do if a 500 error page appears in php

藏色散人
藏色散人Original
2020-08-10 09:50:444317browse

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. .

What to do if a 500 error page appears in php

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn