[英]$_GET always returning admin
我目前在index.php
上忙於添加通過$_GET
請求的文件。 唯一的問題是,它總是返回admin
而從不返回$_GET
變量中的聲明值。
所有文件都在用作子域的目錄中。
Warning: include(pages/admin.php): failed to open stream: No such file or directory in /home/tjattern/domains/*censored*/public_html/admin/index.php on line 20
我正在請求http://admin.*censored*.nl/index.php?page=dashboard
index.php
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
// include required files
require_once('core/config.php');
require_once('template/tpl_top.php');
if(isset($_COOKIE['as']))
{
if(isset($_GET['page']))
{
$file = "pages/".$_GET['page'].".php";
if(file_exists($file))
{
include($file); // actual line 20
}
else
{
echo 'This page could not be found';
}
}
else
{
include('pages/dashboard.php');
}
}
else
{
include('pages/login.php');
}
require_once('template/tpl_bot.php');
?>
http://ww.example.com/index.php?page=sample
要求這個網址
index.php結尾的$ _GET ['page']將為“樣本”
您是否在頁面屬性中傳遞正確的值?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.