PHP好厉害呀,点赞
要是数据库连接信息文件改成下面这样:
$ cat global_ip.txt
[global_ip]
10.81.223.142:13306
10.86.92.213:13306
10.81.223.174:13306
[user_pass]
user:logstat
pass:logstat123
[db_name]
db1:db_mfw
db2_db_driserver
现在php里的脚本想去连接数据库,想从上面随机获取一个ip和端口, 数据库用户名及密码,db名称.
$mysqlconn = new mysqli("10.81.223.174", "logstat", "logstat123", "db_mfw", 13306);
前辈好厉害呀
PHP好厉害呀,点赞
要是数据库连接信息文件改成下面这样:
$ cat global_ip.txt
[global_ip]
10.81.223.142:13306
10.86.92.213:13306
10.81.223.174:13306
[user_pass]
user:logstat
pass:logstat123
[db_name]
db1:db_mfw
db2_db_driserver
现在php里的脚本想去连接数据库,想从上面随机获取一个ip和端口, 数据库用户名及密码,db名称.
$mysqlconn = new mysqli("10.81.223.174", "logstat", "logstat123", "db_mfw", 13306);
前辈好厉害呀