留言板读取出问题了,求指导 1.不知道该把这段代码放在php里还是html里2.win8开发居然显示不兼容 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 其实放在php和html都是可以的就是你代码里面的<?= $row['title']?>这样的短标签不支持 还是改成<?php echo $row['title'];?>吧 改成了这样,虽然没有错误但读取不到数据,数据库有记录条<html><head><title></title></head><body><?php include("conn.php"); ?> <table width=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef"> <?php $sql = "SELECT * FROM message order by lastdate desc"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)){ ?> <tr bgcolor="#eff3ff"> <td><b><big> 标题:<?php echo $row['title'];?></big><b/> <b><sub> 用户:<?php echo $row['user'];?></sub></b></td> </tr> <tr bgColor="#ffffff"> <td>内容:<?= toHtmlcode($row['content'])?></td> </tr> <?php } ?> </table> </body> </html> 你的内容没改啊 并且你的toHtmlcode函数有吗? <td>内容:<?= toHtmlcode($row['content'])?></td> 你好,问题解决了吗?你的conn.php 贴出来看看? while($row = mysql_fetch_array($query)){ print_r($row);} 如何不显示shell的返回信息 getJSON请求PHP数据问题 php简单的用户登录我已经做好了 看看有什么缺陷? csdn找不到linux版,这里贴个问题:如何在linux(rhel)关机或重启时,执行自己的脚本? php+mysql导致mysql里面的显示是乱码 菜鸟一枚,大神帮忙 如何区分自动全局变量,超全局变量,全局变量?是不是我设置了register_globals为ON之后,HTML向PHP传值时就不用使用$_POST[]了呢? 安装PHPMYAMIN! appserv 配置多站点 工厂订单排期算法问题 PHP正则问题 为什么插入不了
就是你代码里面的<?= $row['title']?>这样的短标签不支持 还是改成<?php echo $row['title'];?>吧
<head><title></title></head><body><?php
include("conn.php");
?>
<table width=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef">
<?php
$sql = "SELECT * FROM message order by lastdate desc";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query)){
?>
<tr bgcolor="#eff3ff">
<td><b><big>
标题:<?php echo $row['title'];?></big><b/> <b><sub>
用户:<?php echo $row['user'];?></sub></b></td>
</tr>
<tr bgColor="#ffffff">
<td>内容:<?= toHtmlcode($row['content'])?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>
print_r($row);
}