php get为空,php – $_GET在url有变量时为空
生活随笔
收集整理的這篇文章主要介紹了
php get为空,php – $_GET在url有变量时为空
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
我有一個看起來像這個reglph的文件?lang = no_NO& passkey = test并試圖獲取密碼變量,但它一直顯示為空白.
當我嘗試print_r($_ GET);它打印Array()?!怎么會發生這種情況?
該網站看起來像這樣
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顯示空白.它已經讓我瘋了一段時間了..
總結
以上是生活随笔為你收集整理的php get为空,php – $_GET在url有变量时为空的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux下tar解压特定的目录
- 下一篇: python统计pdf下载_python