Php [处理该指令时出错]
Php [an error occurred while processing this directive]
我的 php 代码有问题。目录及其代码在直接访问时工作正常
例如subdomain.domain.com/folder_name_c/index.php?id=1
但是当我使用 header() 函数重定向到该目录时,它会产生错误。 [处理该指令时发生错误]
这是我正在使用的代码。
if($_POST){
if($_POST['xyz'] != '' && $_POST['xyz2'] != ''){
header("Location http://subdomain.domain.com/folder_name_c/index.php?id=".$_POST['comp']."&xyz=".$_POST['xyz']."&xyz2=".$_POST['xyz2']);
}else if($_POST['month'] != ''){
header("Location http://subdomain.domain.com/folder_name_c/index.php?id=".$_POST['comp']."&xyz=".$_POST['xyz']);
}
}
帮助将不胜感激。
我认为问题出在
header("Location: ...
位置后需要一个冒号
我的 php 代码有问题。目录及其代码在直接访问时工作正常
例如subdomain.domain.com/folder_name_c/index.php?id=1
但是当我使用 header() 函数重定向到该目录时,它会产生错误。 [处理该指令时发生错误]
这是我正在使用的代码。
if($_POST){
if($_POST['xyz'] != '' && $_POST['xyz2'] != ''){
header("Location http://subdomain.domain.com/folder_name_c/index.php?id=".$_POST['comp']."&xyz=".$_POST['xyz']."&xyz2=".$_POST['xyz2']);
}else if($_POST['month'] != ''){
header("Location http://subdomain.domain.com/folder_name_c/index.php?id=".$_POST['comp']."&xyz=".$_POST['xyz']);
}
}
帮助将不胜感激。
我认为问题出在
header("Location: ...
位置后需要一个冒号