-
-
//连接到本地mysql数据库,选择test为操作库
- $mysqli = mysqli_connect("localhost", "root", "","test", 3306);
- //用mysql_query函数从user表里读取数据
- $result = mysqli_query($mysqli, "SELECT * FROM userinfo");
- while($row = mysqli_fetch_array($result))//通过循环读取数据内容
- {
- ?>
-
|
-
|
-
|
-
-
}
- //关闭对数据库的连接
- mysqli_free_result($result);
- mysqli_close($mysqli);*/
- ?>
复制代码
|