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

PHP setupIncludePath函数代码示例

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

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



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

示例1: MAX_remotehostPrivateAddress

function MAX_remotehostPrivateAddress($ip)
{
    setupIncludePath();
    require_once 'Net/IPv4.php';
    $aPrivateNetworks = array('10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '127.0.0.0/24');
    foreach ($aPrivateNetworks as $privateNetwork) {
        if (Net_IPv4::ipInNetwork($ip, $privateNetwork)) {
            return true;
        }
    }
    return false;
}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:12,代码来源:dxmlrpc.php


示例2: setupConstants


//.........这里部分代码省略.........
    define('MINUTES_PER_DAY', 1440);
    // Connection status types. Only the default conversion
    // status (MAX_CONNECTION_STATUS_APPROVED) is defined (4), which
    // is a conversion type that is approved by default.
    // Note also that only ignore, pending and approved
    // are used as possible starting values (ie. in the
    // campaigns_trackers table.
    define('MAX_CONNECTION_STATUS_IGNORE', 1);
    define('MAX_CONNECTION_STATUS_PENDING', 2);
    define('MAX_CONNECTION_STATUS_ONHOLD', 3);
    define('MAX_CONNECTION_STATUS_APPROVED', 4);
    define('MAX_CONNECTION_STATUS_DISAPPROVED', 5);
    define('MAX_CONNECTION_STATUS_DUPLICATE', 6);
    // Connection action type constants
    define('MAX_CONNECTION_TYPE_SALE', 1);
    define('MAX_CONNECTION_TYPE_LEAD', 2);
    define('MAX_CONNECTION_TYPE_SIGNUP', 3);
    // Financial constants
    define('MAX_FINANCE_CPM', 1);
    define('MAX_FINANCE_CPC', 2);
    define('MAX_FINANCE_CPA', 3);
    define('MAX_FINANCE_MT', 4);
    // Monthly Tennancy
    define('MAX_FINANCE_RS', 5);
    // % Revenue split     (zone-only)
    define('MAX_FINANCE_BV', 6);
    // % Basket value      (zone-only)
    define('MAX_FINANCE_AI', 7);
    // Amount per item     (zone-only)
    define('MAX_FINANCE_ANYVAR', 8);
    // % of any variable   (zone-only)
    define('MAX_FINANCE_VARSUM', 9);
    // % of a variable sum (zone-only)
    $GLOBALS['_MAX']['STATUSES'] = array(MAX_CONNECTION_STATUS_IGNORE => 'strStatusIgnore', MAX_CONNECTION_STATUS_PENDING => 'strStatusPending', MAX_CONNECTION_STATUS_ONHOLD => 'strStatusOnHold', MAX_CONNECTION_STATUS_APPROVED => 'strStatusApproved', MAX_CONNECTION_STATUS_DISAPPROVED => 'strStatusDisapproved', MAX_CONNECTION_STATUS_DUPLICATE => 'strStatusDuplicate');
    $GLOBALS['_MAX']['CONN_TYPES'] = array(MAX_CONNECTION_TYPE_SALE => 'strConnTypeSale', MAX_CONNECTION_TYPE_LEAD => 'strConnTypeLead', MAX_CONNECTION_TYPE_SIGNUP => 'strConnTypeSignUp');
    // IP Address used to determine which (if any) MaxMind databases are installed
    define('MAX_MIND_TEST_IP', '24.24.24.24');
    // Maximum random number
    define('MAX_RAND', mt_getrandmax());
    define('MAX_RAND_INV', 1 / MAX_RAND);
    // Maintenance Engine Constants: Number of days to keep old maintenance
    // data, before pruning, where a fixed retention value is appriopriate
    define('OA_MAINTENANCE_FIXED_PRUNING', 30);
    define('MAX_LIMITATION_EQUAL', 0);
    define('MAX_LIMITATION_NOT_EQUAL', 1);
    define('MAX_LIMITATION_BITWISE', 2);
    // Define the week to start on Sunday (0) so that the PEAR::Date and
    // PEAR::Date_Calc classes agree on what day is the start of the week
    define('DATE_CALC_BEGIN_WEEKDAY', 0);
    // Do not overload DataObjects as it allows us to work with 4.3.10
    define('DB_DATAOBJECT_NO_OVERLOAD', true);
    // Ensure that the initialisation has not been run before
    if (!isset($GLOBALS['_MAX']['CONF'])) {
        // Define the installation base path if not defined
        // since local mode will pre-define this value
        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');
        }
        define('IS_WINDOWS', DIRECTORY_SEPARATOR === '\\');
        // Setup the include path
        setupIncludePath();
        // Parse the configuration file
        $GLOBALS['_MAX']['CONF'] = parseIniFile();
        // Define the cache file location path (required trailing slash)
        define('MAX_CACHE', MAX_PATH . '/var/cache/');
        // Set the URL access mechanism
        if (!empty($GLOBALS['_MAX']['CONF']['openads']['requireSSL'])) {
            $GLOBALS['_MAX']['HTTP'] = 'https://';
        } else {
            if (isset($_SERVER['SERVER_PORT'])) {
                if (isset($GLOBALS['_MAX']['CONF']['openads']['sslPort']) && $_SERVER['SERVER_PORT'] == $GLOBALS['_MAX']['CONF']['openads']['sslPort']) {
                    $GLOBALS['_MAX']['HTTP'] = 'https://';
                } else {
                    $GLOBALS['_MAX']['HTTP'] = 'http://';
                }
            }
        }
        // Set the True Type Font path
        if (isset($GLOBALS['_MAX']['CONF']['graphs']['ttfDirectory'])) {
            define('IMAGE_CANVAS_SYSTEM_FONT_PATH', $GLOBALS['_MAX']['CONF']['graphs']['ttfDirectory']);
        }
        // Set the dbms type
        if (isset($GLOBALS['_MAX']['CONF']['database']) && $GLOBALS['_MAX']['CONF']['database']['type'] == 'mysql') {
            define('phpAds_dbmsname', 'MySQL');
        } else {
            if (isset($GLOBALS['_MAX']['CONF']['database']) && $GLOBALS['_MAX']['CONF']['database']['type'] == 'pgsql') {
                define('phpAds_dbmsname', 'Postgres');
            }
        }
    }
}
开发者ID:akirsch,项目名称:revive-adserver,代码行数:101,代码来源:constants.php


示例3: setupIncludePath

<?php

/*
+---------------------------------------------------------------------------+
| Revive Adserver                                                           |
| http://www.revive-adserver.com                                            |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
setupIncludePath();
require_once MAX_PATH . '/lib/Max.php';
require_once MAX_PATH . '/lib/OA/DB/AdvisoryLock.php';
require_once MAX_PATH . '/lib/OA/Preferences.php';
require_once OX_PATH . '/lib/OX.php';
/**
 * A library class for providing automatic maintenance process methods.
 *
 * @static
 * @package    OpenXMaintenance
 */
class OA_Maintenance_Auto
{
    function run()
    {
        // Make sure that the output is sent to the browser before
        // loading libraries and connecting to the db
        flush();
        $aConf = $GLOBALS['_MAX']['CONF'];
        // Set longer time out, and ignore user abort
开发者ID:Jaree,项目名称:revive-adserver,代码行数:31,代码来源:Auto.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP setupLinks函数代码示例发布时间:2022-05-15
下一篇:
PHP setupConfigVariables函数代码示例发布时间: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