当前位置:Gxlcms > 数据库问题 > mysql_healthly

mysql_healthly

时间:2021-07-01 10:21:17 帮助过:15人阅读

<?php if (!defined(‘IN_PDK‘)){ define(‘IN_PDK‘, true); } $db_name = $_GET[‘db_name‘]; $configs = include_once("include/config/db.ini.php"); echo "<pre>"; foreach($configs as $c){ if($c[‘master‘][‘dbname‘] != $db_name && $db_name) continue; $mysql_server_name=$c[‘master‘][‘host‘]; //改成自己的mysql数据库服务器 $mysql_username=$c[‘master‘][‘username‘]; //改成自己的mysql数据库用户名 $mysql_password=$c[‘master‘][‘password‘]; //改成自己的mysql数据库密码 $mysql_database=$c[‘master‘][‘dbname‘]; //改成自己的mysql数据库名 $conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) ; //连接数据库 if($conn){ echo $c[‘master‘][‘host‘].$c[‘master‘][‘username‘].$c[‘master‘][‘dbname‘].‘ ok‘."<br>"; }else{ echo $c[‘master‘][‘host‘].$c[‘master‘][‘username‘].$c[‘master‘][‘dbname‘].‘ error‘."<br>"; } }

 

mysql_healthly

标签:master   password   include   ini   error   sql   数据库服务器   mysql数据库   数据库   

人气教程排行