24h購物| | PChome| 登入
2023-01-13 16:32:33| 人氣4| 回應0 | 下一篇
推薦 0 收藏 0 轉貼0 訂閱站台

PHP毛病Notice Use of undefined

  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錯誤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
複製代碼



改為:
 



還有個不是法子的辦法就是

在每一個檔案頭上加

 

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

固然欠好弄但是可以解決問題!!!!!!這個比力好用

參考文章

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

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

1.png



PHP 的提醒而非報錯,PHP 本身不需要事前宣佈變數即可直接使用,但是對未宣佈變數會有提醒。一般作為正式的網站會把提示關掉的,乃至連錯誤資訊也被關掉

封閉 PHP 提醒的方式

搜尋php.ini:

 

  1. error_reporting = E_ALL
複製代碼


本文出自: 網站架設

台長: andypwbr3

您可能對以下文章有興趣

人氣(4) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 工作甘苦(工作心得、創業、求職) | 個人分類: NetYea |
此分類下一篇:Arduino ESP32 用光敏電阻做小夜燈

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文