|
主题: 大家看一下,我找不到错误码的地方
|
 秋云逸梦
职务:普通成员
等级:2
金币:1.0
发贴:249
|
#12002/12/4 9:23:36
在电脑报抄了一个聊天室程序,完全照报上抄的,就是有一个显示留言的文件显示有错误码,此文件是display.php,代码如下: "> 发言 echo"欢迎光临我的聊天室"; mysql_connect("localhost","root","root"); $query="select username,text from talk order by date desc limit 0,20"; $result=mysql_db_query=("myweb",$query); if($result) { while($r=mysql_fetch_array($result)) { $username=$r["username"]; $date=$r["date"]; $text=$r["text"]; echo""; echo"$username$date说道:$text | "; echo" "; }} else { echo"对不起,系统故障!"; } mysql_free_result($result); ?>
提示错误如下: Parse error: parse error in C:\apache\htdocs\lts\display.php on line 14 但我应该加的地方都加了,就是不知道错误在那里,那位大虾能看一下这个程序,非常感谢!!
|
 buzzard
职务:普通成员
等级:1
金币:0.0
发贴:75
|
#22002/12/5 14:41:29
mysql_connect("localhost","root","root"); 密码也是root?
|
 speedc
职务:普通成员
等级:1
金币:0.0
发贴:4
|
#32002/12/5 23:21:04
$result=mysql_db_query=("myweb",$query); 语法错
|
 西楼居士
职务:普通成员
等级:1
金币:0.0
发贴:39
|
#42002/12/10 17:02:43
应该$result=mysql_db_query("myweb",$query);
|