• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP setupConfigVariables函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: init

/**
 * The environment initialisation function for the mAdserve administration interface.
 *
 */
function init()
{
    global $mad_install_active;
    // Set up server variables
    setupServerVariables();
    // Set up the UI constants
    setupConstants();
    // Set up the common configuration variables
    setupConfigVariables();
    // Setup Time Zone
    if (MAD_TIMEZONE_OVERRIDE) {
        $GLOBALS['_DATE_TIMEZONE_DEFAULT'] = MAD_DEFAULT_TIMEZONE;
        date_default_timezone_set(MAD_DEFAULT_TIMEZONE);
    }
    error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED);
    // If not being called from the installation script...
    if (!isset($GLOBALS['_MAX']['CONF']['madserve']['installed']) || !$GLOBALS['_MAX']['CONF']['madserve']['installed']) {
        define('MAD_INSTALLATION_STATUS', MAD_INSTALLATION_STATUS_NOTINSTALLED);
    } else {
        if ($GLOBALS['_MAX']['CONF']['madserve']['installed'] && file_exists(MAD_PATH . '/conf/UPGRADE')) {
            define('MAD_INSTALLATION_STATUS', MAD_INSTALLATION_STATUS_UPGRADING);
        } else {
            if ($GLOBALS['_MAX']['CONF']['madserve']['installed'] && file_exists(MAD_PATH . '/conf/INSTALLED')) {
                define('MAD_INSTALLATION_STATUS', MAD_INSTALLATION_STATUS_INSTALLED);
            }
        }
    }
    // CHECK IF SCRIPT IS INSTALLED; OTHERWISE REDIRECT TO INSTALLER
    if (MAD_INSTALLATION_STATUS != MAD_INSTALLATION_STATUS_INSTALLED && $mad_install_active != 1) {
        require_once MAD_PATH . '/functions/adminredirect.php';
        MAD_Admin_Redirect::redirect(MAD_ADSERVING_PROTOCOL . MAD_getHostName() . substr(dirname(__FILE__), strlen($_SERVER['DOCUMENT_ROOT'])) . '/www/cp/install.php');
        exit;
    }
    // Store the original memory limit before changing it
    $GLOBALS['_OX']['ORIGINAL_MEMORY_LIMIT'] = MAD_getMemoryLimitSizeInBytes();
    // Increase the PHP memory_limit value to the mAdserve minimum required value, if necessary
    MAD_increaseMemoryLimit(MAD_getMinimumRequiredMemory());
    if (MAD_INSTALLATION_STATUS == MAD_INSTALLATION_STATUS_INSTALLED) {
        if ($mad_install_active == 1) {
            echo "mAdserve has already been installed.";
            exit;
        }
        if (!MAD_connect_maindb()) {
            echo "Unable to connect to mAdserve main database. Please check the variables supplied in /conf/main.config.php and verify that MySQL is running.";
            exit;
        }
        if ($GLOBALS['_MAX']['CONF']['reportingdatabase']['useseparatereportingdatabase']) {
            if (!MAD_connect_repdb()) {
                echo "Unable to connect to separated mAdserve reporting database. Please check the variables supplied in /conf/main.config.php and verify that MySQL is running.";
                exit;
            }
        }
    }
    if (!$GLOBALS['_MAX']['CONF']['reportingdatabase']['useseparatereportingdatabase']) {
        global $repdb;
        $repdb = $maindb;
    }
}
开发者ID:aiurlano,项目名称:mAdserve-Fork,代码行数:62,代码来源:init.php


示例2: 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


示例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


示例4: define

|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
/**
 * @package    OpenX
 * @subpackage TestSuite
 */
define('TEST_ENVIRONMENT_RUNNING', true);
require_once '../init-parse.php';
require_once '../constants.php';
require_once '../memory.php';
require_once '../variables.php';
setupConstants();
setupConfigVariables();
/**
 * The environment initialisation function for the OpenX testing environment.
 */
function init()
{
    // Disable notices, but enable warnings
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);
    // Always include the configuration file
    include_once MAX_PATH . '/tests/config.php';
}
// Run the init() function
init();
// Load PEAR
require_once 'PEAR.php';
// Set $conf
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:init.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP setupIncludePath函数代码示例发布时间:2022-05-15
下一篇:
PHP setup函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap