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


PHP XenForo_Application::host方法代码示例

本文整理汇总了PHP中XenForo_Application::host方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Application::host方法的具体用法?PHP XenForo_Application::host怎么用?PHP XenForo_Application::host使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XenForo_Application的用法示例。


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

示例1: beginApplication

 /**
  * Begin the application. This causes the environment to be setup as necessary.
  *
  * @param string Path to application configuration directory. See {@link $_configDir}.
  * @param string Path to application root directory. See {@link $_rootDir}.
  * @param boolean True to load default data (config, DB, etc)
  */
 public function beginApplication($configDir = '.', $rootDir = '.', $loadDefaultData = true)
 {
     if ($this->_initialized) {
         return;
     }
     if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
         self::undoMagicQuotes($_GET);
         self::undoMagicQuotes($_POST);
         self::undoMagicQuotes($_COOKIE);
         self::undoMagicQuotes($_REQUEST);
     }
     if (function_exists('get_magic_quotes_runtime') && get_magic_quotes_runtime()) {
         @set_magic_quotes_runtime(false);
     }
     @ini_set('memory_limit', 128 * 1024 * 1024);
     ignore_user_abort(true);
     @ini_set('output_buffering', false);
     while (@ob_end_clean()) {
     }
     error_reporting(E_ALL | E_STRICT & ~8192);
     set_error_handler(array('XenForo_Application', 'handlePhpError'));
     set_exception_handler(array('XenForo_Application', 'handleException'));
     //@ini_set('pcre.backtrack_limit', 1000000);
     date_default_timezone_set('UTC');
     self::$time = time();
     self::$host = empty($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST'];
     self::$secure = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on';
     require XenForo_Autoloader::getInstance()->autoloaderClassToFile('Lgpl_utf8');
     $this->_configDir = $configDir;
     $this->_rootDir = $rootDir;
     $this->addLazyLoader('requestPaths', array($this, 'loadRequestPaths'));
     if ($loadDefaultData) {
         $this->loadDefaultData();
     }
     $this->_initialized = true;
 }
开发者ID:hahuunguyen,项目名称:DTUI_201105,代码行数:43,代码来源:Application.php

示例2: beginApplication

 /**
  * Begin the application. This causes the environment to be setup as necessary.
  *
  * @param string Path to application configuration directory. See {@link $_configDir}.
  * @param string Path to application root directory. See {@link $_rootDir}.
  * @param boolean True to load default data (config, DB, etc)
  */
 public function beginApplication($configDir = '.', $rootDir = '.', $loadDefaultData = true)
 {
     if ($this->_initialized) {
         return;
     }
     if (!defined('PHP_VERSION_ID')) {
         $version = explode('.', PHP_VERSION);
         define('PHP_VERSION_ID', $version[0] * 10000 + $version[1] * 100 + $version[2]);
     }
     if (self::$_initConfig['undoMagicQuotes'] && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
         self::undoMagicQuotes($_GET);
         self::undoMagicQuotes($_POST);
         self::undoMagicQuotes($_COOKIE);
         self::undoMagicQuotes($_REQUEST);
     }
     if (function_exists('get_magic_quotes_runtime') && get_magic_quotes_runtime()) {
         @set_magic_quotes_runtime(false);
     }
     if (self::$_initConfig['setMemoryLimit']) {
         self::setMemoryLimit(64 * 1024 * 1024);
     }
     ignore_user_abort(true);
     if (self::$_initConfig['resetOutputBuffering']) {
         @ini_set('output_buffering', false);
         @ini_set('zlib.output_compression', 0);
         // see http://bugs.php.net/bug.php?id=36514
         // and http://xenforo.com/community/threads/53637/
         if (!@ini_get('output_handler')) {
             $level = ob_get_level();
             while ($level) {
                 @ob_end_clean();
                 $newLevel = ob_get_level();
                 if ($newLevel >= $level) {
                     break;
                 }
                 $level = $newLevel;
             }
         }
     }
     error_reporting(E_ALL | E_STRICT & ~8192);
     set_error_handler(array('XenForo_Application', 'handlePhpError'));
     set_exception_handler(array('XenForo_Application', 'handleException'));
     register_shutdown_function(array('XenForo_Application', 'handleFatalError'));
     //@ini_set('pcre.backtrack_limit', 1000000);
     date_default_timezone_set('UTC');
     self::$time = time();
     self::$host = empty($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST'];
     self::$secure = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on';
     require XenForo_Autoloader::getInstance()->autoloaderClassToFile('Lgpl_utf8');
     $this->_configDir = $configDir;
     $this->_rootDir = $rootDir;
     $this->addLazyLoader('requestPaths', array($this, 'loadRequestPaths'));
     if ($loadDefaultData) {
         $this->loadDefaultData();
     }
     // this is a minor hack as people sometimes set _SERVER[HTTPS] in config.php,
     // so the value may have changed compared to above
     self::$secure = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on';
     $this->_initialized = true;
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:67,代码来源:Application.php


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