在php中获取 数据库的内容,返回到页面
<?php
header("content-type:text/html;charset=utf-8");
$link=mysqli_connect("localhost","root","root","d5");
mysqli_set_charset($link,"utf8");
$query="select * from one";
$p=mysqli_query($link,$query);
print_r(json_encode(mysqli_fetch_all($p)));
mysqli_close($link);
?>