duangou2028 2014-12-07 19:05
浏览 16
已采纳

PHP和SQL基本即时消息[关闭]

I am thinking of creating a simple web based instant messaging using a combination of PHP and SQL. To keep it simple I was thinking of not sending the message to the other clients browser using COMET or AJAX, but simply uploading it to a SQL database. The other clients computer will then periodically refresh the webpage which will cause the PHP code on the server to check for and return any new messages.

Would this method be simply to slow to be actually useful? Thanks in advance :)

  • 写回答

1条回答 默认 最新

  • duanpo7796 2014-12-07 19:10
    关注

    That depends on the scope of your project. If you're thinking of server a thousand users, this is not a recommended method. If you want to chat with your 5 colleagues on an internal LAN: it doesn't really matter much. It will be fast and work just fine.

    You could also consider building it with jQuery + PHP + SQL though; read up on jQuery a bit and you'll be amazed by the power of its AJAX functions.

    Also, if you're lazy or simple don't have enough time, use a premade library like this one here and i'm sure there are many more to be found on the internet.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题