Notice: Undefined index: page in E:\PHP\test.php on line 14的处理方法
错误如下:
Notice: Undefined index: page in E:\PHP\test.php on line 14
治标不治本的就是将php.ini內的reporting部份修改,让notice不显示
error_reporting = E_ALL; display all errors, warnings and notices
修改为:
error_reporting = E_ERROR & ~E_NOTICE & ~E_WARNING
不然 isset($_GET["page"])做个if-else判断。
----修正后的代码----
else $page=1;
您可能感兴趣的文章:
Notice: Undefined index: page in E:\PHP\test.php on line 14的处理方法
php出现Notice : Use of undefined constant 的解决方法
PHP运行出现Notice : Use of undefined constant 的解决方法
php提示Notice: Undefined index 错误解决办法
php错误Undefined variable: 如何解决
[PHP] 工厂模式的一种常规使用方法
php中出现Undefined index和Undefined variable的解决方法
php的mssql_fetch_row、mssql_fetch_array、mssql_fetch_assoc及mssql_fetch_objcect读取数据的
php报错Notice: Undefined variable的解决办法
php提示Notice: Undefined variable的解决办法