Notice: Use of undefined constant charset - assumed 'charset' in on line 9 Notice: Use of undefined constant charset - assumed 'charset' in D:\PHPnow\vhosts\www.336dj.com\install\index.php on line 9这个错误咋回事 求解决。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Notice: Use of undefined constant name - assumed 'name'是你对用的字符串没有加引号 $_GET[name] $_POST[name] 比如这样的.你不加引号人家以为是常量 但是这个常量有没有定义 所以给你个注意提醒一下 但是不是错误 代码能继续执行。$_GET['name'] 改成这样的就可以了。 这个错误就是常量字符串直接用没有定义,比如<?phpprint(charset);?>解决方法就是两种1)<?phpdefine("charset", "charset");print(charset);?>2)print("charset"); <?php include 'include/cmsdj.conn.php'; include 'include/cmsdj.inc.php'; if(cd_webhtml==1 or !file_exists('index.html')){ $cache_id ='index_'; if(!($cache_opt->start($cache_id))){ echo GetTemp('index.html',0); $cache_opt->end(); 这个是第9行} }else{ header('Location:index.html'); } ?> 你给的代码不符合notice信息 你找一下 charset 这个信息在哪儿有?找找函数有没有。 【求助】mysql查找失败不知道什么原因 新人求教~关于正则的模式修正符e的问题,为啥我感觉没啥用呢? 急,请高手指教 如何把seesion文件保存到当前目录下? 能不能写成一行? 急,在线等,如何将jpg格式的图片从数据库中读出,并正确显示出来? 如何将$ddd当成字符串插入库中? 向高手请教一个很简单的连接问题,我真的是黔驴技穷了 Mysql 语句报错 ThinkPHP 时间顺序表达式查询问题 mysql问题,不能修改也不能插入,求高手解决 mysql不报错就是不能更改数据库。。。
你不加引号人家以为是常量 但是这个常量有没有定义 所以给你个注意提醒一下 但是不是错误 代码能继续执行。
$_GET['name'] 改成这样的就可以了。
这个错误就是常量字符串直接用没有定义,比如
<?php
print(charset);
?>解决方法就是两种
1)
<?php
define("charset", "charset");
print(charset);
?>2)
print("charset");
include 'include/cmsdj.inc.php';
if(cd_webhtml==1 or !file_exists('index.html')){
$cache_id ='index_';
if(!($cache_opt->start($cache_id))){
echo GetTemp('index.html',0);
$cache_opt->end(); 这个是第9行
}
}else{
header('Location:index.html');
} ?>