Sqlite + php + ajax instant chat system (ajax persistent connection) I. sqliteajax
Talking nonsense: Today, lol encountered a poor product, and the technology was really good. After that, I was told that the guy told me to ask him for help and he would play. I scolded him for being silly. I hung up and watched them lose. Sometimes, when someone else is in trouble, I start with something strong!
Idea: sqlite: database data, used to save chat records; php links to the database, receives ajax transmission data, and returns processing results; ajax asynchronously obtains chat data and asynchronously updates chat records;
For the database classes used, refer to the previous blog.
1. log on
<? Php session_start ();?> <! DOCTYPE html>
<script src="my.js"></script><script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script><script src="http://cdn.bootcss.com/bootstrap/3.3.2/js/bootstrap.min.js"></script></body>