我试图用列表爆炸对类别和子类别进行排序,但得到
未定义的偏移量:1
这是代码的一部分
$squery = $_SERVER['QUERY_STRING'];
$smarty->assign('query', $squery);
list($str, $trash) = explode('&', $squery, 2);
list($category, $subcategory) = explode('=', $str, 2);
switch($category)
{
case 'locale':
$_SESSION['locale'] = $subcategory;
checklocale();
header('Location:'.($_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : '.'));
break;
default:
include 'main.php';
break;
}
你能告诉我我做错了什么吗