本文整理汇总了PHP中Input::noGPC方法的典型用法代码示例。如果您正苦于以下问题:PHP Input::noGPC方法的具体用法?PHP Input::noGPC怎么用?PHP Input::noGPC使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Input
的用法示例。
在下文中一共展示了Input::noGPC方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initialize
protected function _initialize()
{
Input::noGPC();
if (false === ($setting = F('setting'))) {
$setting = D('setting')->setting_cache();
}
C($setting);
$this->assign('async_sendmail', session('async_sendmail'));
}
示例2: _initialize
protected function _initialize()
{
//消除所有的magic_quotes_gpc转义
Input::noGPC();
/* 读取站点配置 */
if (false === ($config = F('config'))) {
$config = D('config')->lists();
}
C($config);
//添加配置
header('Content-Type:text/html; charset=' . C('SITE_CHARSET'));
}
示例3: _initialize
function _initialize()
{
//消除所有的magic_quotes_gpc转义
Input::noGPC();
//载入标签类
import("TagLib.TagLibZu", APP_PATH . 'Lib');
//初始化站点配置信息
$this->initSite();
//echo $this->_get("menuid");
//取得菜单信息
$menuid = (int) $this->_get("menuid");
$this->_initMenu($menuid);
//跳转时间
$this->assign("waitSecond", 2000);
$this->assign("__token__", $this->getToken());
}
示例4: _initialize
protected function _initialize()
{
$this->_domain_auth();
Input::noGPC();
if (false === ($setting = F('setting'))) {
$setting = D('setting')->setting_cache();
}
C($setting);
$this->assign('async_sendmail', session('async_sendmail'));
$this->mod = new Model();
S('table_list') == null && S('table_list', $this->mod->db->getTables());
foreach (S('table_list') as $val) {
$name = substr($val, strlen(C('DB_PREFIX')));
$mod_name = $name . '_mod';
$evalstr = "\$this->{$mod_name}=D('{$name}');\n";
eval($evalstr);
}
$this->assign('server', $_SERVER);
}
示例5: _initialize
protected function _initialize()
{
//消除所有的magic_quotes_gpc转义
Input::noGPC();
//初始化网站配置
if (false === ($setting = F('setting'))) {
$setting = D('setting')->setting_cache();
}
//设置tokenTall值
$tokenTall = $this->_request('tokenTall', 'trim', '');
if ($tokenTall != "") {
$_SESSION["tokenTall"] = $tokenTall;
}
//设置wecha_id值
$this->getWechaId();
C($setting);
//发送邮件
$this->assign('async_sendmail', session('async_sendmail'));
}
示例6: _initialize
protected function _initialize()
{
//消除所有的magic_quotes_gpc转义
Input::noGPC();
//初始化网站配置
if (false === ($setting = F('setting'))) {
$setting = D('setting')->setting_cache();
}
C($setting);
//发送邮件
$this->assign('async_sendmail', session('async_sendmail'));
$url = get_url();
$searchbot = get_spider();
$ip = get_client_ip();
if ($searchbot) {
$showdate = date('Y-m-d');
$file = FTX_DATA_PATH . 'spider/' . $showdate . '.txt';
$time = time();
$data = fopen($file, 'a');
fwrite($data, "{$searchbot}|{$url}|{$ip}|{$time}\n");
fclose($data);
}
}
示例7: init
public static function init()
{
Input::noGPC();
if (C('OUTPUT_ENCODE')) {
$zlib = ini_get('zlib.output_compression');
if (empty($zlib)) {
ob_start('ob_gzhandler');
}
}
date_default_timezone_set(C('DEFAULT_TIMEZONE'));
load_ext_file();
Dispatcher::dispatch();
define('NOW_TIME', $_SERVER['REQUEST_TIME']);
define('REQUEST_METHOD', $_SERVER['REQUEST_METHOD']);
define('IS_GET', REQUEST_METHOD == 'GET' ? true : false);
define('IS_POST', REQUEST_METHOD == 'POST' ? true : false);
define('IS_PUT', REQUEST_METHOD == 'PUT' ? true : false);
define('IS_DELETE', REQUEST_METHOD == 'DELETE' ? true : false);
define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' || !empty($_POST[C('VAR_AJAX_SUBMIT')]) || !empty($_GET[C('VAR_AJAX_SUBMIT')]) ? true : false);
tag('url_dispatch');
if (C('VAR_FILTERS')) {
$filters = explode(',', C('VAR_FILTERS'));
foreach ($filters as $filter) {
array_walk_recursive($_POST, $filter);
array_walk_recursive($_GET, $filter);
}
}
C('LOG_PATH', realpath(LOG_PATH) . '/');
C('TMPL_EXCEPTION_FILE', realpath(C('TMPL_EXCEPTION_FILE')));
$App = F("App");
define('MODEL_EXTRESDIR', 'statics/extres/' . strtolower(GROUP_NAME) . '/');
if ('Admin' == GROUP_NAME && isset($App['Domains'])) {
$Config = F("Config");
$http_host = strtolower($_SERVER['HTTP_HOST']);
$Module_Domains_list = F("Module_Domains_list");
if (false == $Module_Domains_list) {
try {
D("Domains")->domains_cache();
$Module_Domains_list = F("Module_Domains_list");
} catch (Exception $exc) {
if (C('LOG_RECORD')) {
Log::write("缓存:Module_Domains_list 加载失败!");
}
}
}
if ((int) $Config['domainaccess']) {
$domain = explode("|", $Module_Domains_list["Admin"]);
if ($Module_Domains_list["Admin"] && !in_array($http_host, $domain)) {
send_http_status(404);
exit;
}
}
}
if (!in_array(GROUP_NAME, $App)) {
$msg = L('_MODULE_NOT_EXIST_') . GROUP_NAME . "," . L('_MODULE_NOT_INSTAL_') . "!";
if (APP_DEBUG) {
throw_exception($msg);
} else {
if (C('LOG_RECORD')) {
Log::write($msg . "URL:" . get_url());
}
send_http_status(404);
exit;
}
}
return;
}
示例8: init
/**
* 应用程序初始化
* @access public
* @return void
*/
public static function init()
{
//消除所有的magic_quotes_gpc转义
Input::noGPC();
// 页面压缩输出支持
if (C('OUTPUT_ENCODE')) {
$zlib = ini_get('zlib.output_compression');
if (empty($zlib)) {
ob_start('ob_gzhandler');
}
}
// 设置系统时区
date_default_timezone_set(C('DEFAULT_TIMEZONE'));
// 加载动态项目公共文件和配置
load_ext_file();
// URL调度
Dispatcher::dispatch();
// 定义当前请求的系统常量
define('NOW_TIME', $_SERVER['REQUEST_TIME']);
define('REQUEST_METHOD', $_SERVER['REQUEST_METHOD']);
define('IS_GET', REQUEST_METHOD == 'GET' ? true : false);
define('IS_POST', REQUEST_METHOD == 'POST' ? true : false);
define('IS_PUT', REQUEST_METHOD == 'PUT' ? true : false);
define('IS_DELETE', REQUEST_METHOD == 'DELETE' ? true : false);
define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' || !empty($_POST[C('VAR_AJAX_SUBMIT')]) || !empty($_GET[C('VAR_AJAX_SUBMIT')]) ? true : false);
// URL调度结束标签
tag('url_dispatch');
// 系统变量安全过滤
if (C('VAR_FILTERS')) {
$filters = explode(',', C('VAR_FILTERS'));
foreach ($filters as $filter) {
// 全局参数过滤
array_walk_recursive($_POST, $filter);
array_walk_recursive($_GET, $filter);
}
}
C('LOG_PATH', realpath(LOG_PATH) . '/');
//动态配置 TMPL_EXCEPTION_FILE,改为绝对地址
C('TMPL_EXCEPTION_FILE', realpath(C('TMPL_EXCEPTION_FILE')));
//##################################################################
$App = F("App");
//模块(应用)静态资源目录地址extresdir
define('MODEL_EXTRESDIR', 'statics/extres/' . strtolower(GROUP_NAME) . '/');
//后台模块比较特殊,可以指定域名访问,其他模块不需要经过此步骤
if ('Admin' == GROUP_NAME && isset($App['Domains'])) {
//网站配置缓存
$Config = F("Config");
//当前域名
$http_host = strtolower($_SERVER['HTTP_HOST']);
//域名绑定模块缓存
$Module_Domains_list = F("Module_Domains_list");
if (false == $Module_Domains_list) {
try {
D("Domains")->domains_cache();
$Module_Domains_list = F("Module_Domains_list");
} catch (Exception $exc) {
if (C('LOG_RECORD')) {
Log::write("缓存:Module_Domains_list 加载失败!");
}
}
}
if ((int) $Config['domainaccess']) {
$domain = explode("|", $Module_Domains_list["Admin"]);
if ($Module_Domains_list["Admin"] && !in_array($http_host, $domain)) {
//后台不是用指定域名访问,直接404!
send_http_status(404);
exit;
}
}
}
//判断当前访问的模块是否在已安装模块列表中
if (!in_array(GROUP_NAME, $App)) {
$msg = L('_MODULE_NOT_EXIST_') . GROUP_NAME . "," . L('_MODULE_NOT_INSTAL_') . "!";
if (APP_DEBUG) {
// 模块不存在 抛出异常
throw_exception($msg);
} else {
if (C('LOG_RECORD')) {
Log::write($msg . "URL:" . get_url());
}
send_http_status(404);
exit;
}
}
return;
}