本文整理匯總了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;
}