<?
header('Content-Type: text/xml');
//echo '<?xml version="1.0"?><results><notice>no login</notice></results>';
//echo '<?xml version="1.0" encoding="gb2312"?><results><notice>未登陆</notice></results>';
?>请完整复制以上3行代码,当然了,有两行是注释,但是会出错。
头晕了,看不错错在那里了

解决方案 »

  1.   

    XML File contains error:
    error on line 2 at column 1: Extra content at the end of the document
    <br />
    <b>Parse error</b>:  syntax error, unexpected $end in <b>D:\wwwroot\aa.php</b> on line <b>131</b><br />
      

  2.   

    Parse error: syntax error, unexpected $end in D:\wwwroot\btut2004\wwwroot\bbs\hack\bet2\ajax.php on line 131来自火狐上面发的那条来自傲游
      

  3.   

    tryheader('Content-Type: text/xml');
    /*
    //echo '<?xml version="1.0"?><results><notice>no login</notice></results>';
    //echo '<?xml version="1.0" encoding="gb2312"?><results><notice>未登陆</notice></results>';
    */
      

  4.   

    /*
    //echo '<?xml version="1.0"?><results><notice>no login</notice></results>';
    */
    //echo '<?xml version="1.0" encoding="gb2312"?><results><notice>未登陆</notice></results>';
    改成这样也会很出错
      

  5.   

    /*
    //echo '<?xml version="1.0"?><results><notice>no login</notice></results>';
    */
    echo '<?xml version="1.0" encoding="gb2312"?><results><notice>未登陆</notice></results>';
    这样依然出错
      

  6.   

    前面比较,就很明显了啊问题在于,php里,单行注释,如果包含php代码结束符,则会认为php代码结束,而后面的会被作为普通文本处理但是如果后面又遇到<?,而你开启了短标签,,则不能预计后果……规范写注释就好了