最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php mysql 连接 数据库选择 显示所有表
时间:2022-06-24 19:05:10 编辑:袖梨 来源:一聚教程网
$phps教程ql_user = "root";
$phpsql_password = "root";
$phpsql_loc = "";
$phpsql_db = "";
function phpsql_connect($location, $username, $password){
global $phpsql_loc, $phpsql_user, $phpsql_password;
if($phpsql_user != $username || $phpsql_password != $password)
phpsql_error("cannot access to phpsql!(wrong username/wrong password)");
define(phpsql_loc, $location);
$phpsql_loc = $location;
}
function phpsql_select_db($db){
global $phpsql_db;
define(phpsql_db, $db);
$phpsql_db = $db;
}
function phpsql_list_table(){
global $phpsql_loc, $phpsql_db;
$i = 0;
if(!($handle = @opendir($phpsql_loc."/".$phpsql_db)))
return 0;
while(($file = readdir($handle)) !== false){
if($file != "." && $file != "..")
{
$table[$i ++] = $file;
}
}
return $table;
}
相关文章
- 咸鱼商品被下架了怎么办 03-27
- 铁路12306官网登录入口-铁路12306官网登录失败怎么办 03-27
- 智联招聘网页版怎么登录 03-27
- 网站为什么会降权 03-27
- 啵乐腐味官方2026新版-啵乐官方漫画网页版极速下载 03-27
- 126邮箱官网免费登录入口在哪 03-27