留言板读取出问题了,求指导 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);} 请教高手: windows 2003 PHP 提示 No input file specified. array()使用中遇到的问题 请教如何输出PHP文件 怎么为自己的博客添加RSS订阅功能? phpMyAdmin如何让一张表里面的数字等于另外一张表中三个数字相加的总和并且可以动态更新? php能不能连接多个数据库 我想要一个这样的功能,删除整个网站,用PHP写的 老大们,我心都等急了,帮我看看我的问题好吗?谢谢…… <textarea >....</textarea>中间内容传递不过去???? 求助:关于php中curl文件上传下载的问题! 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);
}