int mysql_errno ([ resource $link_identifier ] )
string mysql_error ([ resource $link_identifier ] )
<?php
$link = mysql_connect("localhost", "root", "wrongpassword")
or die ("Can not connect to database<br><br>" . mysql_errno(). " " . mysql_error());
echo "Connect to database OK!";
mysql_close($link);
?>
Can not connect to database
1045 Access denied for user 'root'@'localhost' (using password: YES)
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |