留言板读取出问题了,求指导

WBOY
Release: 2016-06-23 14:00:35
Original
783 people have browsed it

  include("conn.php");  
?>  

  
  $sql = "SELECT * FROM message order by lastdate desc";  
  $query = mysql_query($sql);  
  while($row = mysql_fetch_array($query)){  
?>  
  
    
    
    
    
    
    
  }  
?>  
  
    标题:= $row['title']?>
       
    用户:= $row['user']?>
内容:= toHtmlcode($row['content'])?>
  
  


回复讨论(解决方案)

出什么问题了?把问题说明白了吧

1.不知道该把这段代码放在php里还是html里
2.win8开发居然显示不兼容

其实放在php和html都是可以的
就是你代码里面的= $row['title']?>这样的短标签不支持 还是改成

改成了这样,虽然没有错误但读取不到数据,数据库有记录条








  include("conn.php");  
?>  
  
  $sql = "SELECT * FROM message order by lastdate desc";  
  $query = mysql_query($sql);  
  while($row = mysql_fetch_array($query)){  
?>  
  
    
    
    
    
    
    
  }  
?>  
  
    标题:
       
    用户:
内容:= toHtmlcode($row['content'])?>
  

  

你的内容没改啊 并且你的toHtmlcode函数有吗?

内容: = toHtmlcode($row['content'])?>  

复制错了一份/尴尬

有无错误信息,错误提示打开没有。

现在没有错误提示了,谢谢楼上诸位

你好,问题解决了吗?你的conn.php 贴出来看看?

 while($row = mysql_fetch_array($query)){  
    print_r($row);
}

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!