b.php:
$con=mysqli_connect('localhost','root','root','test'); //用户名和密码请自己修改
$a=mysqli_query($con,'select * from a'); //表名自己修改
$html="<table border='1' width='100'><tr><td>id</td><td>name</td></tr>";
while($rel=mysqli_fetch_assoc($a)){
$html=$html."<tr><td>{$rel['id']}</td><td>{$rel['name']}</td></tr>";
}
$html.'</table>';
file_put_contents('a.html',$html);
$con=mysqli_connect('localhost','root','root','test'); //用户名和密码请自己修改
$a=mysqli_query($con,'select * from a'); //表名自己修改
$html="<table border='1' width='100'><tr><td>id</td><td>name</td></tr>";
while($rel=mysqli_fetch_assoc($a)){
$html=$html."<tr><td>{$rel['id']}</td><td>{$rel['name']}</td></tr>";
}
$html.'</table>';
file_put_contents('a.html',$html);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货