作者allen501pc (Linux User!)
看板NCHU-SG
標題[建議] 官方網站的留言板掛了
時間Fri Sep 2 19:44:31 2011
本想留些意見上去,輸入訊息完畢送出後,出現以下訊息:
error
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link
resource in C:\AppServ\www\SG17\areaGuestbook\index.php on line 70
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource
in C:\AppServ\www\SG17\areaGuestbook\index.php on line 71
在下推測:
mysql_select_db()這個function的prototype是
bool mysql_select_db (
string $database_name [,
resource $link_identifier ])
index.php 第70行代表你的
resource是錯誤的或是空值。
若要得到
resource代表著你要使用Function像是
mysql_connect()、
mysql_pconnect()
之類的function。
這兩個函數在php官方網站有說明,若你給予的參數(ex:
host, username, password)
有錯誤的話,會造成資料庫連線異常或是資料庫無法成功連接。
由於我在官方網站上找不到資訊部長的Mail(雖然是同系的),所以才來貴板提醒一下。
--
╒═╕
║ ║║║ ★愛過方知情重★
╠═╣║║╓═┐╭─╮
║ ║║║╠═╜║ ║ ★醉過方知酒濃★
║ ║║║╰─╯│ │ http://allen501pc.blogspot.com
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.120.15.132