Home > Backend Development > PHP Tutorial > Solution to Notice: Use of undefined constant when running PHP_PHP Tutorial

Solution to Notice: Use of undefined constant when running PHP_PHP Tutorial

WBOY
Release: 2016-07-13 17:39:23
Original
1011 people have browsed it

 Notice: Use of undefined constant ALL_PS - assumed ALL_PS in E:Servervhostswww.lvtao.netglobal.php on line 50

 Notice: Undefined index: EaseTemplateVer in E:Servervhostswww.lvtao.netlibs emplate.core.php on line 51

 Notice: Use of undefined constant uid - assumed uid in E:Servervhostswww.lvtao.netglobal.php on line 54

 Notice: Undefined index: uid in E:Servervhostswww.lvtao.netglobal.php on line 54

 Notice: Use of undefined constant cuid - assumed cuid in E:Servervhostswww.lvtao.netglobal.php on line 55

 Notice: Undefined index: cuid in E:Servervhostswww.lvtao.netglobal.php on line 55

When entering the website, a large number of prompts similar to the following will appear, but it can be displayed and run normally

 Notice: Use of undefined constant ctbTitle - assumed ctbTitle in d:ctb1.5ctbincludeconfig.php on line 23...

bAnswer: These are PHP prompts rather than errors. PHP itself can be used directly without declaring variables in advance, but there will be prompts for undeclared variables. Generally, as an official website, prompts will be turned off, and even error messages will be turned off

How to turn off PHP prompts

Search php.ini:

error_reporting = E_ALL

Changed to:

 error_reporting = E_ALL & ~E_NOTICE

Another alternative is

Add

to the header of each file

 error_reporting(0); Although it is not easy to fix, it can solve the problem

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486319.htmlTechArticleNotice: Use of undefined constant ALL_PS - assumed ALL_PS in E:Servervhostswww.lvtao.netglobal.php on line 50 Notice : Undefined index: EaseTemplateVer in E:Servervhostswww.lvtao.ne...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template