為什么會提示這個呢?
otice: Undefined index: act in I:\phpstudy\imcco\fileManager\index.php on line 8
Notice: Undefined index: filename in I:\phpstudy\imcco\fileManager\index.php on line 9
為什么會提示這個呢?
otice: Undefined index: act in I:\phpstudy\imcco\fileManager\index.php on line 8
Notice: Undefined index: filename in I:\phpstudy\imcco\fileManager\index.php on line 9
2014-08-18
舉報
2014-08-19
Notice不是錯誤,這和你PHP的錯誤級別設置的有關!你可以配置PHP配置文件中的error_reporting選項,之后設置E_ALL&~E_NOTICE,重啟服務器就好了!^_^...
2014-10-08
第一次打開頁面因為你你沒有點act 所以就會出現未定義? 當你點了以后就沒事;
2014-09-11
解決了,在前面加個@符號就不報錯了!
2014-09-04
最好把代碼貼出來, 不然怎么知道你哪里有問題??
猜測,你這里肯定是直接使用了某個變量, 一般不想讓其有提示 除了上面的方法,讓PHP引擎幫我們隱藏,還可以 自己規范, 比較常用的方法是 用isset()函數判斷,如果存在這個變量才使用,不存在的話后面使用,會出現你上面的Notice錯誤, 所以我們可以給個初始的默認值!