How does a PHP website prevent important server information such as & nbsp; url & nbsp; abc from being displayed when the file behind the website does not exist. asp & nbsp; If this file does not exist, the error page shown in figure (image 1) is displayed. However, the error information may leak server-related information, how to prevent him from appearing on this interface, or, when an error occurs, a prompt (image 2) ------ best solution ----- how does the PHP website make the file after the website does not exist, do not display important server information
For example, http: // URL/abc. asp. If this file does not exist,
The error page shown in Figure 1 is displayed ),
However, an error message may expose server-related information. how can I prevent this interface from appearing? or, when an error occurs, a prompt is displayed (image 2)
------ Best solution --------------------
Specify error handling page 404
Modify IIS in IIS Manager
Apache ErrorDocument 404/404 .php in the configuration file
------ Other solutions --------------------
Unfortunately, the editor reversed my images. The one above is (image 2), and the one below is (image 1 ).
------ Other solutions --------------------
Thank you very much for your support ~