$result=mysql_query("select path from news_class where id=$classid");先在上面打印一下echo $classid; echo $newsid;我估计是应该修改为: $result=mysql_query("select path from news_class where id=$newsid");
$result=mysql_query("select path from news_class where id=$classid");先在上面打印一下echo $classid; echo $newsid;看看是否传了参数过来了。。我估计是应该修改为: $result=mysql_query("select path from news where id=$newsid");
没有输出错误信息?修改php.ini: error_reporting = E_ALL & ~E_NOTICE display_errors = On
你只不过 $result = mysql_query("select path from news_class where id=$classid"); $rs = mysql_fetch_array($result); 哪来的 $rs["title"]、$rs["author"] ?
数据库是MySQL的话表名,字段名要用``扩起来啊。
确实,楼主你应该 $result = mysql_query("select title, author from news_class where id=$classid");
echo $newsid;我估计是应该修改为:
$result=mysql_query("select path from news_class where id=$newsid");
echo $newsid;看看是否传了参数过来了。。我估计是应该修改为:
$result=mysql_query("select path from news where id=$newsid");
error_reporting = E_ALL & ~E_NOTICE
display_errors = On
$result = mysql_query("select path from news_class where id=$classid");
$rs = mysql_fetch_array($result); 哪来的 $rs["title"]、$rs["author"] ?
确实,楼主你应该
$result = mysql_query("select title, author from news_class where id=$classid");