<?php
|
namespace CfgReader;
|
#´´½¨ÈÕÆÚ£º2012-4-25 ÏÂÎç2:10:48
|
#×÷Õߣºxcc
|
include_once '\Common\ConfigReader.php';
|
include_once '\Common\Logging.php';
|
|
global $cfgReaderObj;
|
$ConfigFile = dirname(__FILE__)."\..\InterfaceConfig.php";
|
|
function GetConfigFile()
|
{
|
global $ConfigFile;
|
return $ConfigFile;
|
}
|
|
function ReadConfig()
|
{
|
global $cfgReaderObj;
|
global $ConfigFile;
|
if ( isset($cfgReaderObj) )
|
{
|
return true;
|
}
|
$cfgReaderObj = new \ConfigReader\ConfigReader($ConfigFile);
|
\Logging\LogInfo("Read Config File:".$ConfigFile);
|
return $cfgReaderObj->load();
|
}
|
|
function GetConfigErrInfo()
|
{
|
global $cfgReaderObj;
|
if ( isset($cfgReaderObj) )
|
{
|
return $cfgReaderObj->GetErrInfo();
|
}
|
|
return "Not New ConfigReader, Please Call ReadConfig() To Do It!";
|
}
|
|
function GetConfigData($section, $ident, &$ret)
|
{
|
global $cfgReaderObj;
|
return $cfgReaderObj->GetData($section, $ident, $ret);
|
}
|
|
?>
|