简体   繁体   English

每隔几分钟在PHP + mysql上自动保存

[英]Autosave on PHP+mysql every few minutes

I have a site (php) with a text editor that I want to be saved automatically every few minutes (on mysql) and I wanted to consult with you about this. 我有一个带有文本编辑器的网站(php),我希望每隔几分钟自动保存一次(在mysql上),我想就此向您咨询。

(You may know this behavior from the Google Docs platform.) (您可能从Google Docs平台知道此行为。)

Won't it kill my DB if I'll call it again and again? 如果我一遍又一遍地叫它会杀死我的数据库吗? Is their a known approach for this type of feature? 他们是否知道这种功能? Does it matter if I save every minute or every type that the user is doing? 我保存用户的每一分钟或每种类型都重要吗?

Any tips that can help me start with this feature? 有什么技巧可以帮助我从此功能开始?

It depends on your server and the amount of data saved to mysql, tell us more why do you want to save text editor data to database, i m pretty sure there sa better way to do this. 这取决于您的服务器和保存到mysql的数据量,请告诉我们更多为什么要将文本编辑器数据保存到数据库,我m pretty sure there更好的方法来做到这一点。

If you want to save data for users, you should use local storage, you can do it using JQuery plugins: 如果要为用户保存数据,则应使用本地存储,可以使用JQuery插件进行存储:

Ex: http://www.jstorage.info/ 例如: http//www.jstorage.info/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM