php get为空,php – $_GET在url有变量时为空
我有一個(gè)看起來像這個(gè)reglph的文件?lang = no_NO& passkey = test并試圖獲取密碼變量,但它一直顯示為空白.
當(dāng)我嘗試print_r($_ GET);它打印Array()?!怎么會(huì)發(fā)生這種情況?
該網(wǎng)站看起來像這樣
print_r($_GET);
include('..\libs\Smarty.class.php');
?>
Activate account(...html code.. )
$smarty = new Smarty;
//$smarty->force_compile = true;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 120;
// PHP gettext api
define('PROJECT_DIR', realpath('./'));
(... define gettext ... )
$passkey=$_GET['passkey'];
(...work with passkey ...)
$smarty->display('templates\site.tpl');
?>
而已.我無法理解為什么$_GET顯示空白.它已經(jīng)讓我瘋了一段時(shí)間了..
總結(jié)
以上是生活随笔為你收集整理的php get为空,php – $_GET在url有变量时为空的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux下tar解压特定的目录
- 下一篇: phpMailer 配置 企业邮局 16