本文介绍了我的主要内容页面上的PHP错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为我的课程在php网站上工作.我目前正在学习和理解开关代码,以及它如何利用菜单键索引.由于某种原因,我在页面第24行D:../../../../index.php中的注意:未定义的索引:menukey"上不断收到此错误.但是,一旦选择其他页面,即使单击主页链接,该错误也会消失.以下是我的index.php第24行的代码.有人可以照耀一下吗?
第24行-47
I''m working on a php website for my class. I''m currently in the process of learning and understanding the switch code, and how it utilizes the menukey index. For some reason I keep getting this error on my page "Notice: Undefined index: menukey in D:../../../../index.php on line 24". However once you select a different page the error goes away, even if you hit the home link. Below is the code from line 24 of my index.php. Could someone please shine some light on this?
Line 24 - 47
<?php switch ($_GET[''menukey'']) {<br mode="hold" /?>
case 1:
include "div/primarycontent.php";
break;
case 2:
include "contactus.php";
break;
case 3:
include "services.php";
break;
case 4:
include ("http://store.apple.com/us");
break;
default: // case else
include "div/primarycontent.php";
break;
}
?>
推荐答案
这篇关于我的主要内容页面上的PHP错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!