复制以下代码保存为***.php 运行就OK了 lt;?php$user = quot;数据库用户名quot;; //$password = quot;数据库密码quot;;//$
复制以下代码保存为***.php 运行就OK了
$user = "数据库用户名"; //
$password = "数据库密码";//
$db_name = "数据库名";//
$link = mysql_connect("localhost:3306",$user,$password);
mysql_select_db("$db_name",$link);
echo "
正在清空数据库...";
$result=mysql_query("show tables",$link);
while ($currow=mysql_fetch_array($result)) {
mysql_query("drop table if exists $currow[0]");
echo $currow[0]."
";
}
echo "成功
?>
//把以上代码传到空间任意目录下,通过网址访问就可以了!!!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号