当前位置: 首页>>代码示例>>PHP>>正文


PHP parseDeliveryIniFile函数代码示例

本文整理汇总了PHP中parseDeliveryIniFile函数的典型用法代码示例。如果您正苦于以下问题:PHP parseDeliveryIniFile函数的具体用法?PHP parseDeliveryIniFile怎么用?PHP parseDeliveryIniFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了parseDeliveryIniFile函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setupDeliveryConfigVariables

/**
 * A function to initialize the environmental constants and global
 * variables required by delivery.
 */
function setupDeliveryConfigVariables()
{
    if (!defined('MAX_PATH')) {
        define('MAX_PATH', dirname(__FILE__));
    }
    if (!defined('MAD_PATH')) {
        define('MAD_PATH', MAX_PATH);
    }
    // Ensure that the initialisation has not been run before
    if (!isset($GLOBALS['_MAX']['CONF'])) {
        // Parse the Max configuration file
        $GLOBALS['_MAX']['CONF'] = parseDeliveryIniFile();
    }
    // Set up the common configuration variables
    setupConfigVariables();
}
开发者ID:aiurlano,项目名称:mAdserve-Fork,代码行数:20,代码来源:vars.php

示例2: test_parseDeliveryIniFile

 /**
  * A method to test the getConfigVersion() method.
  */
 function test_parseDeliveryIniFile()
 {
     $host = OX_getHostName();
     copy(MAX_PATH . '/lib/OA/tests/data/test.demo.conf.php', MAX_PATH . '/var/' . $host . '.test.demo.conf.php');
     copy(MAX_PATH . '/lib/OA/tests/data/test.real.conf.php', MAX_PATH . '/var/test.real.conf.php');
     $result = parseDeliveryIniFile('', 'test.demo');
     $this->assertIsA($result, 'array');
     $this->assertTrue(isset($result['database']));
     $this->assertEqual($result['database']['username'], 'demo_user');
     $this->assertEqual($result['database']['password'], 'demo_pass');
     $this->assertEqual($result['database']['name'], 'demo_name');
     $this->assertTrue(isset($result['real']));
     $this->assertEqual($result['real']['key1'], 'val1');
     $this->assertEqual($result['real']['key2'], 'val2');
     @unlink(MAX_PATH . '/var/' . $host . '.test.demo.conf.php');
     @unlink(MAX_PATH . '/var/test.real.conf.php');
 }
开发者ID:Jaree,项目名称:revive-adserver,代码行数:20,代码来源:ConfParse.cor.test.php

示例3: setupDeliveryConfigVariables

function setupDeliveryConfigVariables()
{
    if (!defined('MAX_PATH')) {
        define('MAX_PATH', dirname(__FILE__) . '/../..');
    }
    if (!defined('OX_PATH')) {
        define('OX_PATH', MAX_PATH);
    }
    if (!defined('RV_PATH')) {
        define('RV_PATH', MAX_PATH);
    }
    if (!defined('LIB_PATH')) {
        define('LIB_PATH', MAX_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'OX');
    }
    if (!isset($GLOBALS['_MAX']['CONF'])) {
        $GLOBALS['_MAX']['CONF'] = parseDeliveryIniFile();
    }
    setupConfigVariables();
}
开发者ID:JackyKit,项目名称:revive-adserver,代码行数:19,代码来源:ti.php


注:本文中的parseDeliveryIniFile函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。