- PHP Notice: Use of undefined constant eng_name - assumed 'eng_name'
複製代碼
固然欠好弄然則可以解決問題!!!!!!這個對照好用
參考文章
文章出處:網頁設計,網站架設 ,網路行銷,網頁優化,SEO - NetYea 網頁設計
本文為人人講授的是PHP毛病Notice : Use of undefined constant 的完善解決方式,這個php的非致命錯誤提醒在pph5.3以上的版本中出現的頻率十分好,首要是因為php.ini中的錯誤級別設置裝備擺設的問題,感樂趣的同窗參考下.
本文為人人講解的是PHP毛病Notice : Use of undefined constant 的完美解決方式,這個php的非致命錯誤提示在php5.3以上的版本中呈現的頻率很是好,首要是因為php.ini中的毛病級別設置裝備擺設的問題.
問題申明:會快速造成磁碟空間滿載,致使系統無法正常使用.
- cat /var/log/httpd/error_log
複製代碼
進入網站會泛起大量雷同下面的提醒,然則可以正常顯示和履行
- error_reporting = E_ALL &; ~E_NOTICE
複製代碼
- PHP Notice: Use of undefined constant eng_name - assumed 'eng_name' in /home/www/showasr601.php on line 19
- PHP Notice: Use of undefined constant status - assumed 'status' in /home/www/showasr601.php on line 19
- PHP Notice: Use of undefined constant eventtime - assumed 'eventtime' in /home/www/showasr601.php on line 18
- PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/www/showasr601.php on line 18
- PHP Notice: Use of undefined constant eng_name - assumed 'eng_name' in /home/www/showasr601.php on line 19
- PHP Notice: Use of undefined constant status - assumed 'status'
複製代碼
還有個不是門徑的設施就是
在每一個檔案頭上加
PHP 的提醒而非報錯,PHP 自己不需要事前宣佈變數便可直接使用,可是對未宣告變數會有提示。一般作為正式的網站會把提醒關掉的,甚至連毛病資訊也被關掉
關閉 PHP 提醒的方法
搜索php.ini:
改為:
來自:
文章定位: