Related questions about die

Source: Internet
Author: User
The question about die
echo ' Fuck ';
$db =mysql_connect (' localhost ', ' bp6am ', ' 123 ')
Or Die (' Unable to connect. ');
?>
This is my code.
Without echo, the entire Web page is HTTP error Internal Server error, and what does this die do here?
Why does the Web page display fuck after echo and does not display an error message?

------Solution--------------------
PHP does not open the error display function.
In php.ini
error_reporting = E_all & ~e_notice
Display_errors = On
------Solution--------------------
First guess if there is no echo, then the entire page is HTTP error (Internal Server error),
Personally think you should be not configured with a good Web server, check your Apache IIS configuration to resolve such issues

In said Die (), is the string information output before the launch script, of course, if $db=mysql_connect (' localhost ', ' bp6am ', ' 123 ')
Or Die (' Unable to connect. ');
If the password is incorrect, the error message of the Mysql--query function is output, and the string information after the die is output. If it does not show.

[Email protected]_connect (' localhost ', ' bp6am ', ' 123 ')
Or Die (' Unable to connect. '); If the password is wrong, it will only output unable to connect.


  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.