if(isset($_GET['s'])) {}或if(array_key_exists('s', $_GET)) {}这首先检查数组中是否确实存在一个键为s的元素.This first checks if there really is an element in the array with a key s.请勿在变量之前分配$_GET['s'],否则您将遇到同样的问题.Don't assign $_GET['s'] to a variable before, otherwise you will have the same issue.我个人总是会为参数分配一个值,即使用index.php?s=1而不是仅仅使用index.php?s.I personally would always assign a value to a parameter, i.e. using index.php?s=1 instead of just index.php?s. 这篇关于未定义的GET ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-22 20:26