hxp
2025-06-04 f4a514d5ac952110da846636ecbb9de951eaf3d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?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);
}
 
?>