close
  1. PHP Notice:  Use of undefined constant eng_name - assumed 'eng_name'
複製代碼



還有個不是舉措的門徑就是

在每一個檔案頭上加

 

1.png

  1. error_reporting(0);
複製代碼
  1. PHP Notice:  Use of undefined constant eng_name - assumed 'eng_name' in /home/www/showasr601.php on line 19
  2. PHP Notice:  Use of undefined constant status - assumed 'status' in /home/www/showasr601.php on line 19
  3. PHP Notice:  Use of undefined constant eventtime - assumed 'eventtime' in /home/www/showasr601.php on line 18
  4. 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
  5. PHP Notice:  Use of undefined constant eng_name - assumed 'eng_name' in /home/www/showasr601.php on line 19
  6. PHP Notice:  Use of undefined constant status - assumed 'status'
複製代碼



PHP 的提醒而非報錯,PHP 自己不需要事先宣佈變數便可直接利用,可是對未宣佈變數會有提醒。網頁設計一般作為正式的網站會把提示關掉的,乃至連毛病資訊也被關掉

封閉 PHP 提醒的方式

搜尋php.ini:

 

  1. error_reporting = E_ALL
複製代碼



進入網站會泛起大量類似下面的提醒,然則可以正常顯示和執行



改為:
 

網頁設計

本文為大家講授的是PHP毛病Notice : Use of undefined constant 的完善解決方式,這個php的非致命毛病提醒在pph5.3以上的版本中泛起的頻率非常好,主要是因為php.ini中的毛病級別配置的問題,感興趣的同窗參考下.

本文為大師講授的是PHP毛病Notice : Use of undefined constant 的完善解決方法,這個php的非致命毛病提示在php5.3以上的版本中呈現的頻率非常好,首要是因為php.ini中的毛病級別設置裝備擺設的問題.

問題申明:
會快速造成磁碟空間滿載,致使系統沒法正常使用.

  1. cat /var/log/httpd/error_log
複製代碼

雖然欠好弄可是可以解決問題!!!!!!這個比較好用

參考文章

文章出處:網頁設計,網站架設 ,網路行銷,網頁優化,SEO -網頁設計 NetYea 網頁設計

  1. error_reporting = E_ALL &; ~E_NOTICE
複製代碼


本篇文章引用自此:
arrow
arrow
    文章標籤
    網頁設計
    全站熱搜
    創作者介紹
    創作者 marshabaopb 的頭像
    marshabaopb

    新竹網頁設計

    marshabaopb 發表在 痞客邦 留言(0) 人氣()