php提示 Notice: Use of undefined constant name - assumed
关闭 PHP 提示的方法
搜索php.ini:
<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy1077')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy1077>error_reporting = E_ALL
改为:
<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy8093')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy8093>error_reporting = E_ALL & ~E_NOTICE
还有个不是办法的办法就是
在每个文件头上加
error_reporting(0); 虽然不好弄但是可以解决问题
如果没有修改php.ini权限的朋友可参考我的方法来解决
源文件:
<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy6923')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy6923>$room[name] = $Name;
$room[retailrate] = $RetailRate;
改成
<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy8494')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy8494>$room['name'] = $Name;
$room['retailrate'] = $RetailRate;
您可能感兴趣的文章:
php出现Notice : Use of undefined constant 的解决方法
PHP运行出现Notice : Use of undefined constant 的解决方法
php提示 Notice: Use of undefined constant name - assumed
[PHP] 工厂模式的一种常规使用方法
php Notice : Use of undefined constant解决办法
php提示Notice: Use of undefined constant错误
PHP保留类及特殊类
php花括号常用规则详解
php错误Undefined variable: 如何解决
PHP Notice: undefined index原因与解决办法