Notice: Use of undefined constant charset - assumed 'charset' in D:\PHPnow\vhosts\www.336dj.com\install\index.php on line 9这个错误咋回事 求解决。

解决方案 »

  1.   

    Notice: Use of undefined constant name - assumed 'name'是你对用的字符串没有加引号  $_GET[name] $_POST[name] 比如这样的.
    你不加引号人家以为是常量 但是这个常量有没有定义 所以给你个注意提醒一下 但是不是错误 代码能继续执行。
    $_GET['name'] 改成这样的就可以了。
      

  2.   


    这个错误就是常量字符串直接用没有定义,比如
    <?php
    print(charset);
    ?>解决方法就是两种
    1)
    <?php
    define("charset", "charset");
    print(charset);
    ?>2)
    print("charset");
      

  3.   

    <?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'); 
    } ?> 
      

  4.   

    你给的代码不符合notice信息 你找一下 charset 这个信息在哪儿有?找找函数有没有。