我有這樣的代碼:爲什麼不是「如果」而不是「其他」?
$link = mysql_connect("localhost", "ctmanager", "pswsafgcsadfgG");
if (! $link)
die("I cannot connect to MySQL.<br>\n");
else
print "Connection is established.<br>\n";
print "a";
if (mysql_create_db("ct", $link))
print "AAA";
else
print "BBB";
print "2";
die();
這是輸出:
Connection is established.
a
所以,我不明白它是如何可能的,既不是「AAA」不「BBB」輸出。是否因爲程序死亡在mysql_create_db
?
很可能,這是我能看到的唯一原因。 – Lazarus 2010-06-16 12:36:41
死於'mysql_create_db'的程序是我的假設。 – ChrisF 2010-06-16 12:37:51