当前位置 : 主页 > 网络编程 > PHP >

php解析XML

来源:互联网 收集:自由互联 发布时间:2021-06-28
XMLUtil.php host; $dbconfig['user'] = $mysql-user; $dbconfig['password'] = $mysql-password; $dbconfig['db'] = $mysql-db; $dbconfig['port'] = $mysql-port; // 将配置信息以关联数组的形式返回 return $dbconfig; } catch ( Exception
XMLUtil.php
 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;
    }
}
网友评论