網頁不添加ruquire則正常

來源:互聯網
上載者:User
環境winserver2003 ie8
一共有3個頁面
a頁面向b頁面發送資料
a頁面js部分





回複討論(解決方案)

b頁面引用c頁面

require_once 'MessageService.class.php';//去掉這句就不會提示缺少對象。檔案存在名字也沒錯
header("Content-Type:text/xml;charset=utf-8");
header("Cache-Control:no-cache");
$getter=$_POST['getter'];
$sender=$_POST['sender'];
$mesList="杭州溫州寧波

";
echo $mesList;
?>

c頁面
class MessageService{
}
?>

你不要 a頁面、b頁面、c頁面的

既然 var url="GetMessageController.php";
那麼 GetMessageController.php 是哪個?

GetMessageController.php是b頁面
'MessageService.class.php';是c頁面

錯誤資訊是什嗎?

MessageService.class.php
這裡有什嗎?

MessageService.class.php
這裡有什嗎?


就是那個c頁面只有個空類

錯誤資訊是什嗎?


缺少對象還是啥對象來著。
提示在myXmlHttpRequest這個對象上,我只要去掉引用哪句,其地方不改就可以了。就是搞不明白為什麼,鬱悶死了。
我已經重新用json重新寫了。

重新用json寫了該功能,現在慢慢等解答。下面補上剩下代碼。

a頁面 chatroom.php的代碼


$username=$_GET['username'];
//去除utf-8空白
$username=trim($username);
session_start();
$loginuser=$_SESSION['loginuser'];
if(!$loginuser){
ob_start();
header("Location:login.php?errno=2");
ob_clean();
exit();
}
?>






聊天視窗





正在和聊天










  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.