1 <?php
2 header("content-type:text/html;charset=utf-8");
3 $con=mysqli_connect("localhost","root","root","test");
4 // 检测连接
5 if (mysqli_connect_errno())
6 {
7 echo "连接失败: " . mysqli_connect_error();
8
9 }
10 $result = mysqli_query($con,"SELECT * FROM members WHERE 1 limit 10");
11 while($row = mysqli_fetch_array($result))
12 {
13 echo $row['member_id'] . " " . $row['mobile'];
14 echo "<br>";
15 }
16 ?>