Notice: Undefined index: page in E:\PHP\test.php on line 14
更新時間:2010年11月02日 23:09:51 作者:
Notice: Undefined index: page in E:\PHP\test.php on line 14
治標(biāo)不治本的就是將php.ini內(nèi)的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判斷!!
----修正後原始碼如下----
if(isset($_GET["page"]))$page=$_GET["page"];
else $page=1;
error_reporting = E_ALL; display all errors, warnings and notices
改成
error_reporting = E_ERROR & ~E_NOTICE & ~E_WARNING
不然
isset($_GET["page"])做個if-else判斷!!
----修正後原始碼如下----
if(isset($_GET["page"]))$page=$_GET["page"];
else $page=1;
您可能感興趣的文章:
- PHP使用Session遇到的一個Permission denied Notice解決辦法
- 基于AppServ,XAMPP,WAMP配置php.ini去掉警告信息(NOTICE)的方法詳解
- PHP提示Notice: Undefined variable的解決辦法
- Notice: Trying to get property of non-object problem(PHP)解決辦法
- PHP運行出現(xiàn)Notice : Use of undefined constant 的完美解決方案分享
- PHP新手NOTICE錯誤常見解決方法
- PHP函數(shù)之error_reporting(E_ALL ^ E_NOTICE)詳細(xì)說明
- 深入理解PHP原理之Session Gc的一個小概率Notice
- php Notice: Undefined index 錯誤提示解決方法
- 屏蔽PHP默認(rèn)設(shè)置中的Notice警告的方法
相關(guān)文章
PHP中spl_autoload_register函數(shù)的用法總結(jié)
本文是對PHP中spl_autoload_register函數(shù)的用法進(jìn)行了詳細(xì)的總結(jié)介紹,需要的朋友可以過來參考下,希望對大家有所幫助2013-11-11
PHP中strncmp()函數(shù)比較兩個字符串前2個字符是否相等的方法
這篇文章主要介紹了PHP中strncmp()函數(shù)比較兩個字符串前2個字符是否相等的方法,實例分析了strncmp()函數(shù)的功能,參數(shù)用法與使用技巧,需要的朋友可以參考下2016-01-01
在PHP中實現(xiàn)Javascript的escape()函數(shù)代碼
在 Javascript 中,可以利用 escape/unescape() 和 eval_r() 函數(shù)進(jìn)行簡單的轉(zhuǎn)碼處理,讓普通的 URL 網(wǎng)址看起來比較怪異,使那些令人討厭的搜索爬蟲無法辨認(rèn)你希望隱藏的資源。2010-08-08

