<!DOCTYPE html><html><head><meta charset="UTF-8"><title>管理员信息管理</title></head><body>< ;?php include("guanli.php");?><h3>管理员信息显示</h3><table width="350" border="1" cellpacing="0">< tr><th>id</th><th>姓名</th><th>账号</th><th>密码</th><th>操作</th> ; </tr><?phpheader("content-type:text/html:charset=utf8");$conn=mysqli_connect("localhost","root","root","admin");mysqli_set_charset($ conn,"utf8");$sql_select="select * from user";foreach ($conn->query($sql_select) as $row){echo "<tr>";echo "<th>{$ row['id']}</th>";echo "<th>{$row['name']}</th>";echo "<th>{$row['acount'] }</th>";echo "<th>{$row['password']}</th>";echo "<th>{$row['createtime']}</th> ";echo "<td><a href='edit.php'>修改</a><a href='del.php'>删除</a><a href=' poss.php'>重置密码</a></td>"; echo "</tr>";}?></table></body></html>
这里面有 PHP 代码 ,需要放到 apache 环境当中,才能编译
php文件能直接在浏览打开?
应该是没调用带php文件