У меня есть URL-адрес, который выглядит так reg.php?lang=no_NO&passkey=test
, и я пытаюсь получить переменную пароля, но он продолжает отображаться пустым.
Когда я пытаюсь print_r($_GET);
, он печатает Array ( )
?! Как это может произойти?
Сайт выглядит примерно так
<?php
print_r($_GET);
include('..\libs\Smarty.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('templates\site.tpl');
?>
</body>
</html>
это оно. Я не могу понять, почему $_GET отображается пустым. Это уже давно сводит меня с ума..