header("location: http://error.php?id=1")

解决方案 »

  1.   

    header("location: http://yourname.com/error.php?id=1") 
      

  2.   

    你require的config.php第三行有错误,导致错误输出了,然后你的header函数就会失效。
    因此,不要考虑location:error.php?id=1出错,先检查你的config.php的正确性
      

  3.   

    //config.php
    <?
    $dbpath="data";
    $userpath="$dbpath/user";
    $messpath="$dbpath/mess";
    $dbname="note.txt";
    ?>
      

  4.   

    改为:
    //config.php
    <?php
    $dbpath = "data";
    $userpath = $dbpath."/user";
    $messpath = $dbpath."/mess";
    $dbname = "note.txt";
    ?>