21,886
社区成员
发帖
与我相关
我的任务
分享
<?php
echo "<html>";
echo "<head>";
echo "<title>";
echo "Reply Page";
echo "</title>";
echo "</head>";
echo "<body>";
echo "<center>";
echo "<font size=5>";
echo "Leave a Reply";
echo "</font>";
echo "<p>";
$file="data.txt";
$msg=file($file);
$msg_count=count($msg);
echo "当前共有留言.".$msg_count>.".条";
echo "<p>";
echo "<a href="submit.php">添加新留言</a>";
echo "<p>";
if($msg_count==0)
echo "没有留言..";
else
{
echo "<table border="1" bordercolor="blue">";
echo "<tr>";
echo "<td>ID</td>";
echo "<td>User</td>";
echo "<td>Title</td>";
echo "<td>Time</td>";
echo "<td>Eicon</td>";
echo "<td>Content</td>";
echo "</tr>";
for($i=0;$i<$msg_count;$i++)
{
$msg_info=explode("-",$msg_info[$i]);
echo "<tr>";
echo "<td>$msg_count-$i</td>";
echo "<td>".$msg_infop[0]."</td>";
echo "<td>".$msg_info[1]."</td>";
echo "<td>".$msg_info[2]".</td>";
echo "<td><img src="img\".$msg_info[3]."\"></td>";
echo "<td>".$msg_info[4]."</td>";
echo "</tr>";
}
echo "</table>";
}
echo "</center>";
echo "</body>";
echo "</html>";
?>