本文整理汇总了PHP中discuz_core::timezone_set方法的典型用法代码示例。如果您正苦于以下问题:PHP discuz_core::timezone_set方法的具体用法?PHP discuz_core::timezone_set怎么用?PHP discuz_core::timezone_set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类discuz_core
的用法示例。
在下文中一共展示了discuz_core::timezone_set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _init_env
function _init_env()
{
error_reporting(E_ERROR);
if (phpversion() < '5.3.0') {
set_magic_quotes_runtime(0);
}
define('DISCUZ_ROOT', substr(dirname(__FILE__), 0, -12));
define('MAGIC_QUOTES_GPC', function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc());
define('ICONV_ENABLE', function_exists('iconv'));
define('MB_ENABLE', function_exists('mb_convert_encoding'));
define('EXT_OBGZIP', function_exists('ob_gzhandler'));
define('TIMESTAMP', time());
discuz_core::timezone_set();
if (!defined('DISCUZ_CORE_FUNCTION') && !@(include DISCUZ_ROOT . './source/function/function_core.php')) {
$this->error('function_core.php is missing');
}
define('IS_ROBOT', checkrobot());
foreach ($GLOBALS as $key => $value) {
if (!isset($this->superglobal[$key])) {
$GLOBALS[$key] = null;
unset($GLOBALS[$key]);
}
}
global $_G;
$_G = array('uid' => 0, 'username' => '', 'adminid' => 0, 'groupid' => 1, 'sid' => '', 'formhash' => '', 'timestamp' => TIMESTAMP, 'starttime' => dmicrotime(), 'clientip' => $this->_get_client_ip(), 'referer' => '', 'charset' => '', 'gzipcompress' => '', 'authkey' => '', 'timenow' => array(), 'PHP_SELF' => '', 'siteurl' => '', 'siteroot' => '', 'config' => array(), 'setting' => array(), 'member' => array(), 'group' => array(), 'cookie' => array(), 'style' => array(), 'cache' => array(), 'session' => array(), 'lang' => array(), 'my_app' => array(), 'my_userapp' => array(), 'fid' => 0, 'tid' => 0, 'forum' => array(), 'rssauth' => '', 'home' => array(), 'space' => array(), 'block' => array(), 'article' => array(), 'action' => array('action' => APPTYPEID, 'fid' => 0, 'tid' => 0));
$_G['PHP_SELF'] = htmlspecialchars($_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['PHP_SELF']);
$_G['basescript'] = CURSCRIPT;
$_G['siteurl'] = htmlspecialchars('http://' . $_SERVER['HTTP_HOST'] . preg_replace("/\\/+(api)?\\/*\$/i", '', substr($_G['PHP_SELF'], 0, strrpos($_G['PHP_SELF'], '/'))) . '/');
$uri = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
$_G['siteroot'] = substr($_G['PHP_SELF'], 0, -strlen(basename($_G['PHP_SELF'])));
$this->var =& $_G;
}