php的parse_ini_file详细用法
解决方法:
1.配置文件config_db.php代码:
<?php
/*
con_db_host = "localhost"
con_db_port = "3306"
con_db_id = "root"
con_db_pass= ""
con_db_name = "yayihouse"
tablepre = "yayi_"
db_charset = "utf8";
*/
?>
2.用法:
将config_db.php的属性加载到$db_settings数组中
$db_settings = array();
$db_settings = parse_ini_file('D:\xampp\htdocs\projectName\config\config_db.php);