我有以下PHP代码,它根据等级重定向
if ($grade == 'Admin')
{
header("location:Admin'FINAL_adminhome.html");
}
else if ($grade == 'Employee')
{
header("location:Admin'FINAL_adminhome.html");
}
else if ($grade == 'Security Guard')
{
header("location:Security guard'securityhome.html");
}
else if ($grade == 'Receptionist')
{
header("location: Reception'recphome.html"); // Line 53
}
对于"管理员","员工"和"保安人员",它会正确重定向。但是,我收到"接待员"的以下错误:
警告:标头不能包含多个标头
''r 表示回车(ASCII 代码 13)。尝试像这样转义斜杠
header("location: Reception''recphome.html");