xmlHttp.responseXML為null

來源:互聯網
上載者:User

回複討論(解決方案)

你ajax裡定的什麼格式??





無標題文檔



header("Content-type:text/html;charset='GBK'");
$id=$_GET["key"];
$link=mysql_connect("localhost","root","");
mysql_select_db("enterprise");
mysql_query("set names 'GBK'");
$sql="select * from etp_news where id=".$id;
$result=mysql_query($sql);
while($rs = mysql_fetch_object($result)){

$tit=$rs->tit;
$cont=$rs->content;
$name=$rs->source;
?>







你怎麼只看返回內容的後半部呢?前半部是 php 的錯誤資訊,為什麼視而不見呢?
兩部分合在一起還能算是 XML 嗎?




求指教

錯誤資訊明確的告訴你 sel_News.php 第 18 行處變數 $content 不存在
你不按錯誤資訊改錯,光抱拳有什麼用?



不加$ctent. 只顯示一條
加了就出錯,找不到ctent,我需要讓他迴圈顯示啊

感謝 版主提醒 問題ok了

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.