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


PHP S::getServer方法代码示例

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


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

示例1: _getHeaderInfoByType

 function _getHeaderInfoByType($type)
 {
     $headerInfo = S::getServer('HTTP_INFO');
     $headerInfo = explode(';', $headerInfo);
     foreach ($headerInfo as $key => $value) {
         list($k, $v) = explode('=', $value);
         $result[$k] = $v;
     }
     return $this->_getPhoneSystemType($result[$type]);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:10,代码来源:post.class.php

示例2: filter

 /**
  * 全局变量过滤
  */
 function filter()
 {
     $allowed = array('GLOBALS' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, 'P_S_T' => 1);
     foreach ($GLOBALS as $key => $value) {
         if (!isset($allowed[$key])) {
             $GLOBALS[$key] = null;
             unset($GLOBALS[$key]);
         }
     }
     if (!get_magic_quotes_gpc()) {
         S::slashes($_POST);
         S::slashes($_GET);
         S::slashes($_COOKIE);
     }
     S::slashes($_FILES);
     $GLOBALS['pwServer'] = S::getServer(array('HTTP_REFERER', 'HTTP_HOST', 'HTTP_X_FORWARDED_FOR', 'HTTP_USER_AGENT', 'HTTP_CLIENT_IP', 'HTTP_SCHEME', 'HTTPS', 'PHP_SELF', 'REQUEST_URI', 'REQUEST_METHOD', 'REMOTE_ADDR', 'QUERY_STRING'));
     !$GLOBALS['pwServer']['PHP_SELF'] && ($GLOBALS['pwServer']['PHP_SELF'] = S::getServer('SCRIPT_NAME'));
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:21,代码来源:security.php

示例3: ObContents

/**
 * 压缩内容,并设置响应头为压缩格式
 *
 * @global string $db_obstart
 * @param string $output 要压缩的内容
 * @return string
 */
function ObContents($output)
{
    ob_end_clean();
    $getHAE = S::getServer('HTTP_ACCEPT_ENCODING');
    if (!headers_sent() && $GLOBALS['db_obstart'] && $getHAE && N_output_zip() != 'ob_gzhandler') {
        $encoding = '';
        if (strpos($getHAE, 'x-gzip') !== false) {
            $encoding = 'x-gzip';
        } elseif (strpos($getHAE, 'gzip') !== false) {
            $encoding = 'gzip';
        }
        if ($encoding && function_exists('crc32') && function_exists('gzcompress')) {
            header('Content-Encoding: ' . $encoding);
            $outputLen = strlen($output);
            $outputZip = "�";
            $outputZip .= substr(gzcompress($output, $GLOBALS['db_obstart']), 0, -4);
            $outputZip .= @pack('V', crc32($output));
            $output = $outputZip . @pack('V', $outputLen);
        } else {
            ObStart();
        }
    } else {
        ObStart();
    }
    return $output;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:33,代码来源:common.php

示例4: elseif

        } elseif ($SMTP = ini_get('SMTP')) {
            $sys_mail = 'SMTP ( Server: ' . $SMTP . ')';
        } else {
            $sys_mail = 'Disabled';
        }
        @extract($db->get_one('SELECT totalmember,yposts FROM pw_bbsinfo WHERE id=1'));
        @extract($db->get_one('SELECT SUM(topic) AS threads,SUM(article) AS posts FROM pw_forumdata'));
        $hits = $db->get_value('SELECT SUM(hits) FROM pw_threads');
        $cachetime = $timestamp + 60 * 60 * 12;
        /** writeover(D_P.'data/bbscache/admin_cache.php',"<?php die;?>$cachetime|$pw_size|$o_size|$dbversion|$max_upload|$max_ex_time|$sys_mail|$totalmember|$threads|$posts|$hits|$yposts\r\n{$cachetext[1]}"); **/
        pwCache::setData(D_P . 'data/bbscache/admin_cache.php', "<?php die;?>{$cachetime}|{$pw_size}|{$o_size}|{$dbversion}|{$max_upload}|{$max_ex_time}|{$sys_mail}|{$totalmember}|{$threads}|{$posts}|{$hits}|{$yposts}\r\n{$cachetext[1]}");
    }
    $altertime = gmdate('Y-m-d H:i', $timestamp + $db_timedf * 3600);
    $systemtime = $db_cvtime == 0 ? $altertime : gmdate('Y-m-d H:i', time() + $db_timedf * 3600);
    $sysversion = PHP_VERSION;
    $sysos = str_replace('PHP/' . $sysversion, '', S::getServer('SERVER_SOFTWARE'));
    $ifcookie = isset($_COOKIE) ? 'SUCCESS' : 'FAIL';
}
if (!$job || $job == 'desktop') {
    if (S::inArray($admin_name, $manager)) {
        $u = 1;
        if (pwWritable(D_P . 'data/sql_config.php')) {
            $warnid += 1;
        }
        if (is_dir('data')) {
            $warnid += 2;
        }
        if (ini_get('register_globals')) {
            $warnid += 4;
        }
        if (file_exists('admin.php')) {
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:admininfo.php

示例5: define

<?php

define('CK', 1);
require_once 'global.php';
if (S::getServer('HTTP_IF_MODIFIED_SINCE') || S::getServer('HTTP_IF_NONE_MATCH') || empty($_COOKIE) && !$pwServer['HTTP_USER_AGENT']) {
    sendHeader('304');
    exit;
}
if ($_GET['admin']) {
    $db_ckpath = '/';
    $db_ckdomain = '';
}
header('Pragma:no-cache');
header('Cache-control:no-cache');
$checkCode = L::loadClass('checkcode', 'site');
$checkCode->out();
exit;
开发者ID:jechiy,项目名称:PHPWind,代码行数:17,代码来源:ck.php


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