在你问之前,是的,在问这个问题之前,我已经搜索了近 20 个关于 SO 的不同“未定义索引”问题。可悲的是,他们都没有给我解决问题的线索。我有一个简单的 index.php 文件,它根据您按下的链接切换不同的 html 文件。在一个似乎完全没有问题的实时服务器上,但是当我使用 Xampp 时,我收到一长串“未定义的索引”,我不知道为什么。我的 Index.php 文件如下。未定义索引消息指出“每行中的未定义索引 rv”。
<?php
include ("anime_header.html");
if($_GET['rv'] == "amnesia") include ("Amnesia.html");
else if($_GET['rv'] == "shingeki") include ("AttackOnTitan.html");
else if($_GET['rv'] == "chuunibyou") include ("Chuunibyou.html");
else if($_GET['rv'] == "crimeedge") include ("CrimeEdge.html");
else if($_GET['rv'] == "datealive") include ("DateALive.html");
else if($_GET['rv'] == "duskmaiden") include ("DuskMaiden.html");
else if($_GET['rv'] == "gargantia") include ("Gargantia.html");
else if($_GET['rv'] == "K_anime") include ("K_Anime.html");
else if($_GET['rv'] == "karneval") include ("Karneval.html");
else if($_GET['rv'] == "kotoura") include ("Kotoura-San.html");
else if($_GET['rv'] == "kaibutsu") include ("LittleMonster.html");
else if($_GET['rv'] == "nerawareta") include ("Nerewareta.html");
else if($_GET['rv'] == "redgarden") include ("RedGarden.html");
else if($_GET['rv'] == "saikano") include ("Saikano.html");
else if($_GET['rv'] == "sakurasou") include ("Sakurasou.html");
else if($_GET['rv'] == "sasamisan") include ("Sasami-San.html");
else if($_GET['rv'] == "vividred") include ("Vividred.html");
else include ("animereviews.html");
include ("ReviewFooter.html");
?>
我不是在寻找一种方法来抑制错误消息,而是了解它为什么只出现在我的 Xampp 服务器上以及将来如何修复它。