[英]PHP refusing to accept cookies
When I develop web page Faced a problem which happen when use session 我开发网页时遇到使用会话时发生的问题
<?php
session_start();
ob_start();
if ($type == 'admin') {
$_SESSION['user_name'] = $User;
$_SESSION['UserType'] = 'admin';
header('Location: Main.php');
} else if ($type == 'manager' && $PID != "") {
$_SESSION['user_name'] = $User;
$_SESSION['UserType'] = 'manager';
$_SESSION['PID'] = $PID;
header('Location: MainPage.php');
}
?>
this Error in all my cases: 我遇到的所有错误:
" Firefox has detected that the server is redirecting the request for this address in a way that will never complete. Firefox已检测到服务器正在以永远无法完成的方式重定向对该地址的请求。
This problem can sometimes be caused by disabling or refusing to accept cookies. 有时可能是由于禁用或拒绝接受Cookie引起的。 "
“
Your script looks like that youre redirecting in a circle. 您的脚本看起来像是您重定向了一圈。 Main.php-> main.php -> main.php and so on.
Main.php-> main.php-> main.php等。 Check your script for such a mistake
检查您的脚本中是否存在此类错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.