欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

PHP運(yùn)行出現(xiàn)Notice : Use of undefined constant 的完美解決方案分享

 更新時(shí)間:2012年03月05日 11:46:43   作者:  
今天修改公司的網(wǎng)站,提示Notice : Use of undefined constant ,通過(guò)下面的方法解決了,最好是error_reporting(0);不需要更改配置
Notice: Use of undefined constant ALL_PS - assumed 'ALL_PS' in E:\Server\vhosts\www.lvtao.net\global.php on line 50

Notice: Undefined index: EaseTemplateVer in E:\Server\vhosts\www.lvtao.net\libs\template.core.php on line 51

Notice: Use of undefined constant uid - assumed 'uid' in E:\Server\vhosts\www.lvtao.net\global.php on line 54

Notice: Undefined index: uid in E:\Server\vhosts\www.lvtao.net\global.php on line 54

Notice: Use of undefined constant cuid - assumed 'cuid' in E:\Server\vhosts\www.lvtao.net\global.php on line 55

Notice: Undefined index: cuid in E:\Server\vhosts\www.lvtao.net\global.php on line 55

Notice: Use of undefined constant shell - assumed 'shell' in E:\Server\vhosts\www.lvtao.net\global.php on line 56

Notice: Undefined index: shell in E:\Server\vhosts\www.lvtao.net\global.php on line 56

Notice: Use of undefined constant cshell - assumed 'cshell' in E:\Server\vhosts\www.lvtao.net\global.php on line 57

Notice: Undefined index: cshell in E:\Server\vhosts\www.lvtao.net\global.php on line 57

Notice: Use of undefined constant username - assumed 'username' in E:\Server\vhosts\www.lvtao.net\global.php on line 58

Notice: Undefined index: username in E:\Server\vhosts\www.lvtao.net\global.php on line 58

Notice: Use of undefined constant cusername - assumed 'cusername' in E:\Server\vhosts\www.lvtao.net\global.php on line 59

Notice: Undefined index: cusername in E:\Server\vhosts\www.lvtao.net\global.php on line 59

Notice: Use of undefined constant id - assumed 'id' in E:\Server\vhosts\www.lvtao.net\companyjob.php on line 10

Notice: Use of undefined constant id - assumed 'id' in E:\Server\vhosts\www.lvtao.net\companyjob.php on line 14

Notice: Use of undefined constant content - assumed 'content' in E:\Server\vhosts\www.lvtao.net\companyjob.php on line 16

Notice: Use of undefined constant content - assumed 'content' in E:\Server\vhosts\www.lvtao.net\companyjob.php on line 16

Notice: Use of undefined constant description - assumed 'description' in E:\Server\vhosts\www.lvtao.net\companyjob.php on line 17

Notice: Use of undefined constant description - assumed 'description' in E:\Server\vhosts\www.lvtao.net\companyjob.php on line 17

Notice: Use of undefined constant provinceid - assumed 'provinceid' in E:\Server\vhosts\www.lvtao.net\companyjob.php on line 18

Notice: Use of undefined constant cityid - assumed 'cityid' in E:\Server\vhosts\www.lvtao.net\companyjob.php on line 19

Notice: Use of undefined constant hy - assumed 'hy' in E:\Server\vhosts\www.lvtao.net\companyjob.php on line 20

Notice: Undefined variable: content in E:\Server\vhosts\www.lvtao.net\libs\template.core.php on line 557

進(jìn)入網(wǎng)站會(huì)出現(xiàn)大量類似下面的提示,但是可以正常顯示和運(yùn)行

Notice: Use of undefined constant ctbTitle - assumed 'ctbTitle' in d:\ctb1.5\ctb\include\config.php on line 23...

b答案:這些是 PHP 的提示而非報(bào)錯(cuò),PHP 本身不需要事先聲明變量即可直接使用,但是對(duì)未聲明變量會(huì)有提示。一般作為正式的網(wǎng)站會(huì)把提示關(guān)掉的,甚至連錯(cuò)誤信息也被關(guān)掉

關(guān)閉 PHP 提示的方法

搜索php.ini:

error_reporting = E_ALL

改為:

error_reporting = E_ALL & ~E_NOTICE

還有個(gè)不是辦法的辦法就是

在每個(gè)文件頭上加

error_reporting(0); 雖然不好弄但是可以解決問(wèn)題!?。。。?!這個(gè)比較好用

相關(guān)文章

  • PHP快速排序quicksort實(shí)例詳解

    PHP快速排序quicksort實(shí)例詳解

    這篇文章主要介紹了PHP快速排序quicksort實(shí)現(xiàn)方法,結(jié)合實(shí)例形式分析了快速排序的原理及php實(shí)現(xiàn)快速排序的相關(guān)操作技巧,需要的朋友可以參考下
    2016-09-09
  • php支付寶接口用法分析

    php支付寶接口用法分析

    這篇文章主要介紹了php支付寶接口用法,以實(shí)例形式較為詳細(xì)的分析了php支付寶接口的使用技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下
    2015-01-01
  • Laravel 5+ .env環(huán)境配置文件詳解

    Laravel 5+ .env環(huán)境配置文件詳解

    這篇文章主要介紹了Laravel 5+ .env環(huán)境配置文件詳解,需要的朋友可以參考下
    2020-04-04
  • 20個(gè)PHP常用類庫(kù)小結(jié)

    20個(gè)PHP常用類庫(kù)小結(jié)

    下面是一些非常有用的PHP類庫(kù),相信一定可以為你的WEB開發(fā)提供更好和更為快速的方法。
    2011-09-09
  • 最新用php獲取谷歌PR值算法,附上php查詢PR值代碼示例

    最新用php獲取谷歌PR值算法,附上php查詢PR值代碼示例

    用php程序怎么獲取谷歌PR值,已經(jīng)有好幾個(gè)人問(wèn)我php查詢PR值怎么實(shí)現(xiàn)的,于是現(xiàn)在就把php查詢PR值法算法附上,大家可以直接使用下面的代碼去測(cè)試php查詢PR值
    2011-12-12
  • php多進(jìn)程并發(fā)編程防止出現(xiàn)僵尸進(jìn)程的方法分析

    php多進(jìn)程并發(fā)編程防止出現(xiàn)僵尸進(jìn)程的方法分析

    這篇文章主要介紹了php多進(jìn)程并發(fā)編程防止出現(xiàn)僵尸進(jìn)程的方法,結(jié)合具體實(shí)例形式總結(jié)分析了php多進(jìn)程并發(fā)編程防止出現(xiàn)僵尸進(jìn)程相關(guān)操作技巧與注意事項(xiàng),需要的朋友可以參考下
    2020-02-02
  • PHP閉包函數(shù)詳解

    PHP閉包函數(shù)詳解

    這篇文章主要為大家詳細(xì)介紹了PHP閉包函數(shù),閉包函數(shù)沒(méi)有函數(shù)名稱,直接在function()傳入變量即可 使用時(shí)將定義的變量當(dāng)作函數(shù)來(lái)處理,對(duì)PHP閉包函數(shù)感興趣的朋友可以參考一下
    2016-02-02
  • PHP array_multisort()函數(shù)的使用札記

    PHP array_multisort()函數(shù)的使用札記

    array_multisort 對(duì)多個(gè)數(shù)組或多維數(shù)組進(jìn)行排序的函數(shù),需要的朋友可以參考下。
    2011-07-07
  • PHP程序61條面向?qū)ο蠓治鲈O(shè)計(jì)的經(jīng)驗(yàn)小結(jié)

    PHP程序61條面向?qū)ο蠓治鲈O(shè)計(jì)的經(jīng)驗(yàn)小結(jié)

    你不必嚴(yán)格遵守這些原則,違背它們也不會(huì)被處以宗教刑罰。但你應(yīng)當(dāng)把這些原則看成警鈴,若違背了其中的一條,那么警鈴就會(huì)響起 。 ----- Arthur J.Riel
    2008-11-11
  • php中將html中的br換行符轉(zhuǎn)換為文本輸入中的換行符

    php中將html中的br換行符轉(zhuǎn)換為文本輸入中的換行符

    PHP中的有個(gè)非常好的函數(shù):nl2br(),將文本框中的換行轉(zhuǎn)換為HTML頁(yè)面的<br />,但是如何實(shí)現(xiàn)將html中的<br />換行符轉(zhuǎn)換為文本框中的換行符呢
    2013-03-03

最新評(píng)論