I have a url that look like this reg.php?lang=no_NO&passkey=test
and im trying to get the passkey variable, but it keeps showing up blank.
When I try print_r($_GET);
it prints Array ( )
?! How can this happen?
The site look something like this
<?php
print_r($_GET);
include('..libsSmarty.class.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Activate account</title>
(...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('templatessite.tpl');
?>
</body>
</html>
thats it. I can't understand why $_GET shows up blank. It's been driving me crazy for a while now..
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…