Home > Backend Development > PHP Tutorial > header("Location: index.php?g=admin"),该怎么处理

header("Location: index.php?g=admin"),该怎么处理

WBOY
Release: 2016-06-13 12:16:34
Original
2444 people have browsed it

header("Location: index.php?g=admin")
根目录下的admin.php文件的代码是:
header("Location: index.php?g=admin");
exit;
我是新手,对这样的跳转不理解,请问这是跳转到哪里?
------解决思路----------------------
index.php
------解决思路----------------------
不是有 require("./thinkphp/setup.php"); 吗
你如何知道 thinkphp/setup.php 不处理 g=admin 这个参数呢
------解决思路----------------------
thinkphp,又是这个害人框架。
------解决思路----------------------
想知道为什么会跳转到后台的逻辑,只能一步一步的追踪代码了。既然出现了跳转的结果,说明参数g=admin一定是被处理了。可能会涉及几个文件,要有耐心。。
------解决思路----------------------
框架要统一入口,所有的请求一律落在index.php上,这样非常方便管理
但为了方便用户,放一个admin.php跳到真正的后台入口处

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template