$_get未传值时报NOTICE错误
加一个判断就可以了
if(is_set($_GET["module"])){
$module = $_GET["module"];
}
例子:
$module = isset($_GET['module'])? $_GET['module']:'index';
或者屏蔽NOTICE错误
加入
error_reporting(E_ALL ^ E_NOTICE);
$_get未传值时报NOTICE错误
加一个判断就可以了
if(is_set($_GET["module"])){
$module = $_GET["module"];
}
例子:
$module = isset($_GET['module'])? $_GET['module']:'index';
或者屏蔽NOTICE错误
加入
error_reporting(E_ALL ^ E_NOTICE);