XMLUtil.php host; $dbconfig['user'] = $mysql-user; $dbconfig['password'] = $mysql-password; $dbconfig['db'] = $mysql-db; $dbconfig['port'] = $mysql-port; // 将配置信息以关联数组的形式返回 return $dbconfig; } catch ( Exception
host; $dbconfig['user'] = $mysql->user; $dbconfig['password'] = $mysql->password; $dbconfig['db'] = $mysql->db; $dbconfig['port'] = $mysql->port; // 将配置信息以关联数组的形式返回 return $dbconfig; } catch ( Exception $e ) { throw new RuntimeException ( "读取数据库配置文件信息出错!" ); } return $dbconfig; } }