剛剛解決了PHP Notice: Undefined index的錯(cuò)誤,卻發(fā)現(xiàn)還存在“PHP Deprecated: Function set_magic_quotes_runtime() is deprecated in……”錯(cuò)誤,估計(jì)是剛才修改了PHP.ini的問(wèn)題。
錯(cuò)誤提示為:PHP Deprecated: Function set_magic_quotes_runtime() is deprecated in X:\web\include\common.inc.php on line 8
在解決PHP Notice: Undefined index錯(cuò)誤的時(shí)候,我將php.ini由之前的:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
修改成了:
error_reporting = E_ALL & ~E_NOTICE
解決了PHP Notice: Undefined index的問(wèn)題,但是又出了set_magic_quotes_runtime()的問(wèn)題。導(dǎo)致這個(gè)提示的原因是在PHP5.3后此特性(set_magic_quotes_runtime())已經(jīng)關(guān)閉,而我們也只需要稍微修改一下就行了,改成:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
這樣就沒(méi)問(wèn)題了。