( ! )解析错误:语法错误,第 121 行的 D:\Yatharth Files\wamp\www\index.php 中意外的"{"



为什么此代码会引发错误

<?php
if(isset($_POST['aca'])){
header("location:Academic");
}elseif(isset($_POST['ed'])){
header("location:EnjoyDev");
}elseif(isset($_POST['hb'])){
header("location:Hoverboard");
}elseif(isset($_POST['lc'])){
header("location:LiveChat");
}elseif(isset($_POST['mp']){
header("location:myPro");
}elseif(isset($_POST['ym'])){
header("location:YatMath");
}
?>

LINE 121:}elseif(isset($_POST['mp']({
我没有漏掉任何分号

第121行:

}elseif(isset($_POST['mp']){

应该是

} elseif( isset($_POST['mp']) ) {

此外,我建议您使用空格来提高代码的可读性。那时你就不会犯这个错误了。

相关内容

最新更新