Home  >  Q&A  >  body text

Implementation of online chat room using JS? Or use PHP?

I want to implement the following instant chat function. Since chat history does not need to be saved, does that mean PHP is no longer needed? Just use JS directly?

吕晨曦吕晨曦1620 days ago1306

reply all(6)I'll reply

  • Storms

    Storms2020-05-14 11:12:32

    Temporary chat records do not need to be stored in the database, and there is no need to use PHP language.

    reply
    0
  • 吕晨曦

    Sorry, the question is a bit wrong. I need to store it in the database. Do you have any code on hand that I can borrow to learn from?

    吕晨曦 · 2020-05-14 11:40:30
    Storms

    Do I need to log in and register to chat? If you don’t need it, there is no need to save it, and there is no key name to save it! If you need to log in and register, create two tables, a good table and a chat record table!

    Storms · 2020-05-14 13:09:52
    吕晨曦

    OK Thanks

    吕晨曦 · 2020-05-14 21:13:19
  • 哈比

    哈比2020-05-14 11:01:06

    You can try Baidu Shangqiao, which is also a chat tool

    reply
    0
  • 吕晨曦

    It's a web chat, not for customer service. Need to record the chat history

    吕晨曦 · 2020-05-14 11:41:28
  • Cancelreply