public function index(){
include("connect.php");
$sql="select * from msg1";
echo "<h3>用户列表:</h3>";
echo ‘<table border="1" width="80%">‘;
$results=mysql_query($sql);
while($user=mysql_fetch_array($results))
{
$time=$user[‘time‘];
echo "<tr>";
echo "<td>{$user[‘Id‘]}</td>";
echo "<td>{$user[‘username‘]}</td>";
echo "<td>{$user[‘content‘]}</td>";
echo "<td>".date("Y-m-d h:i:s",$user[‘time‘])."</td>";
echo ‘<td><a href="">查看</a></td>‘;
echo "</tr>";
}
echo "</table>";
}
时间: 2024-10-11 17:06:43