dongyun51582 2011-04-14 22:59
浏览 29

使用PHP聊天应用程序; 代码更正

I am making an online chat application for my school. I thought it would be cool for users to just switch between users from the same iframe, the box I used that displays msg.txt. Well, it occurred to me that I could just make a form in html, and in php, have an if...else statement concerning the form, basically stating that "If word is received by the 'Aaron' form, Then switch $msg to $msg1." However, it didn't work. What did I do wrong? The code is displayed in a link. The following is a small section of my code, the code I am focused on for this specific problem. http://key-mail.zxq.net/sourcecode.txt

By the way, it was giving me an error having something to do with a T_STRING. What is that? I've searched the web and I can't quite figure it out. Of course, I know what a string is, but I don't know what a T_STRING is or what the T stands for.

  • 写回答

1条回答 默认 最新

  • doupapin172773 2011-04-14 23:54
    关注

    You are not escaping your output. Instead of:

    die(" ...
    

    Do:

    $html = <<<EOA
    ___ YOUR HTML GOES HERE
    EOA;
    die($html);
    
    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向