duanmaifu3428 2015-10-06 08:13
浏览 54

使用XMPP丢失文件错误(XMLStream.php)

I want to send message using XMPP and I have used this code:

include 'XMPP.php';

#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports
#If this doesn't work, are you running 64-bit PHP with < 5.2.6?
$conn = new XMPPHP_XMPP('hostname',5222, 'panelusername', 'panelpassword', 'xmpphp', 'gmail.com', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);

try {
    $conn->connect();
    $conn->processUntil('session_start');
    $conn->presence();
    $conn->message('senderusername', 'This is a test message!');
    $conn->disconnect();
} catch(XMPPHP_Exception $e) {
    die($e->getMessage());
}

But it gives me this error:

Warning: require_once(XMPPHP/XMLStream.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/xmppmessage/examples/XMPP.php on line 30

Fatal error: require_once(): Failed opening required 'XMPPHP/XMLStream.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/xmppmessage/examples/XMPP.php on line 30
  • 写回答

1条回答 默认 最新

  • donglvlao8367 2016-04-22 16:38
    关注

    In the XMPP.php file on line 30, change it from:

    require_once 'XMPPHP/XMLStream.php';
    

    to

    require_once 'XMLStream.php';
    
    评论

报告相同问题?

悬赏问题

  • ¥188 需要修改一个工具,懂得汇编的人来。
  • ¥15 livecharts wpf piechart 属性
  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题