最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

 更新時(shí)間:2012年03月05日 11:46:43   作者:  
今天修改公司的網(wǎng)站,提示Notice : Use of undefined constant ,通過下面的方法解決了,最好是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 本身不需要事先聲明變量即可直接使用,但是對未聲明變量會(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); 雖然不好弄但是可以解決問題?。。。。?!這個(gè)比較好用

相關(guān)文章

最新評(píng)論

慈利县| 老河口市| 镇原县| 阳城县| 于田县| 鄂尔多斯市| 铜山县| 华阴市| 静安区| 赤壁市| 镇远县| 行唐县| 斗六市| 华亭县| 莲花县| 博野县| 二手房| 开江县| 北碚区| 宜章县| 株洲市| 高密市| 博野县| 上林县| 宝应县| 密云县| 蒙自县| 怀集县| 通榆县| 广河县| 抚远县| 临泽县| 东台市| 桐梓县| 定襄县| 抚州市| 宣武区| 阿拉善右旗| 栾城县| 和龙市| 昌宁县|