Question about die & lt ;? Phpechofuck; $ dbmysql_connect (localhost, bp6am, 123) & nbsp; ordie (Unabletoconnect.); & nbsp ;? & Gt; this is my code. if there is no echo, the whole webpage is HTTPError500 (InternalServer's question about die ).
Echo 'fuck ';
$ Db = mysql_connect ('localhost', 'bp6am', '123 ')
Or die ('unable to connect .');
?>
This is my code
If no echo exists, the entire webpage is HTTP Error 500 (Internal Server Error). What is the role of this die?
Why does the webpage display fuck without an error message when echo is available?
------ Solution --------------------
Php does not enable the error display function.
Php. ini
Error_reporting = E_ALL &~ E_NOTICE
Display_errors = On
------ Solution --------------------
If no echo exists, the entire webpage is HTTP Error 500 (Internal Server Error ),
I personally think that you have not configured the web server. check that your apache IIS configuration can solve this problem.
DIE () is the string information output before the script is released. of course, if $ db = mysql_connect ('localhost', 'bp6am', '123 ')
Or die ('unable to connect .');
If the password is incorrect, the mysql -- query function error message is output, and the string information after the die is output. If yes, it is not displayed.
[Email protected] _ connect ('localhost', 'bp6am', '123 ')
Or die ('unable to connect. '); in this way, if the password is wrong, only Unable to connect will be output.