如下为教程给的代码 感觉没问题 难道是我php有问题?但是我做了一个测试的<? echo"hello" ?>能正常显示hello
原因不明
<?php
/*
* PHP100Job v1.0
* Programmer : Msn/QQ [email protected] (925939)
* www.php100.com Develop a project PHP - MySQL - Apache
* Window 2003 - Preferences - PHPeclipse - PHP - Code Templates
*/
include("conn.php"); include("head.php");
$SQL="SELECT * FROM `message` order by id desc";
$query=mysql_query($SQL);
while($row=mysql_fetch_array($query)){
?><table width=500 border="0" cellpadding="5" cellspacing="1" bgcolor="#add3ef">
<tr bgcolor="#eff3ff">
<td>标题:<?=$row[title]?> 用户:<?=$row[user]?></td>
</tr>
<tr bgColor="#ffffff">
<td>内容:<?
echo htmtocode($row[content]);
?></td>
</tr>
</table>
<?
}
?>
原因不明
<?php
/*
* PHP100Job v1.0
* Programmer : Msn/QQ [email protected] (925939)
* www.php100.com Develop a project PHP - MySQL - Apache
* Window 2003 - Preferences - PHPeclipse - PHP - Code Templates
*/
include("conn.php"); include("head.php");
$SQL="SELECT * FROM `message` order by id desc";
$query=mysql_query($SQL);
while($row=mysql_fetch_array($query)){
?><table width=500 border="0" cellpadding="5" cellspacing="1" bgcolor="#add3ef">
<tr bgcolor="#eff3ff">
<td>标题:<?=$row[title]?> 用户:<?=$row[user]?></td>
</tr>
<tr bgColor="#ffffff">
<td>内容:<?
echo htmtocode($row[content]);
?></td>
</tr>
</table>
<?
}
?>
是你定义好的函数么?打开display_errors看看是什么错误啊
也有可能是数据库连接的问题