Php 未定义索引:操作
高亮显示的行是第24行 注意:第24行C:\xampp\htdocs\authors.php中的未定义索引:操作Php 未定义索引:操作,php,Php,高亮显示的行是第24行 注意:第24行C:\xampp\htdocs\authors.php中的未定义索引:操作 **if($_GET['action'] == "list") {** $current = "members"; $list = "members"; } else if($_GET["list"] == "authors") $current = "authors"; else $current = "members";
**if($_GET['action'] == "list") {**
$current = "members";
$list = "members";
}
else if($_GET["list"] == "authors") $current = "authors";
else $current = "members";
首先检查是否设置了
$\u GET['action']
if(isset($_GET['action'])) {
if($_GET['action'] == "list") {
$current = "members";
$list = "members";
} else if($_GET["list"] == "authors") {
$current = "authors";
} else {
$current = "members";
}
}