您的位置:首页 > 数据库

数据库时间转换

2016-04-09 15:47 316 查看
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>";
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: