The page isn’t redirecting properly Firefox has detected that the server is redirecting the request

背景:php–firefox
自己写的管理员登陆页面和主页面
在登陆页面就跳转主页面时出现重定向
The page isn’t redirecting properly Firefox has detected that the server is redirecting the request
问题
分析1:
cookies的问题
做法:清除cookies
无用
分析2:
header()Location的问题
删除session会话变量有的定向
----》重定向问题消失
取而代之的问题是无法跳转到主页面index.php
分析2.1
数据库的问题:
判断是否成功查询数据库
—》成功查询—》排除
分析2.2
注册session会话变量失败
输出session会话变量内容—》有内容



嘤嘤嘤你大爷
----》有session会话变量,但是主页面显示不出来
—》主页面的session会话变量有毛病,但session会话变量是session的全局变量
—》终于主页面访问session会话变量数组名字写错
—》所以造成了session会话变量有内容定向到主页面,主页面session会话变量名字写错,返回定向登陆页面,session会话变量后面代码执行,再次重定向到主页面,主页面再次返回。
造成了2对1 的局面
----》重定向错误
有了Firefox已检测到服务器正在以永远无法完成的方式重定向对该地址的请求。
—》在搜索问题答案中遇到的一些解释就说通了
1.该网页包含重定向循环在已经导致该网页过多的重定向。
2.交叉重定向
3.貌似记得的一个说法就是这个连接重定向很忙
该网页具有重定向循环。该网页的重定向次数过多。
错误如图,修改为相同的seesion全局变量
The page isn’t redirecting properly Firefox has detected that the server is redirecting the request
The page isn’t redirecting properly Firefox has detected that the server is redirecting the request