如何自我更新PHP + MySQL CMS? [英] How to self-update PHP+MySQL CMS?

查看:142
本文介绍了如何自我更新PHP + MySQL CMS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在PHP + MySQL上编写一个CMS。我希望它是可自更新的(在管理面板中点击一下)。什么是最佳实践?

如何比较当前版本的cms和一个版本的更新(应用程序本身和数据库)。应该只是下载zip存档,upzip它和覆盖文件? (但是对不再使用的文件做什么)。如何检查更新是否正确下载?它还支持模块,我希望这个模块可以从cms的管理面板下载。

我应该如何更新MySQL表?

I'm writing a CMS on PHP+MySQL. I want it to be self-updatable (throw one click in admin panel). What are the best practices?
How to compare current version of cms and a version of the update (application itself and database). Should it just download zip archive, upzip it and overwrite files? (but what to do with files that are no longer used). How to check if an update is downloaded correctly? Also it supports modules and I want this modules to be downloadable from the admin panel of cms.
And how should I update MySQL tables?

推荐答案

一个稍微更实验的解决方案可能是使用像 phpsvnclient 库。

A slightly more experimental solution could be to use something like the phpsvnclient library.

具有功能:


  • 列出给定SVN存储库目录

  • 检索文件的给定版本

  • 检索存储库或给定文件中两个修订版本之间的更改日志

  • 获取存储库最新版本

  • List all files in a given SVN repository directory
  • Retrieve a given revision of a file
  • Retrieve the log of changes made in a repository or in a given file between two revisions
  • Get the repository latest revision

这样您可以看到是否有新文件,删除文件或更新的文件,只更改您的本地应用程序中的那些。

This way you can see if there are new files, removed files or updated files and only change those in your local application.

我想这将是一个更难实现,但好处可能是,并更快地向CMS添加更新。

I recon this will be a little harder to implement, but the benefit would probably be that it is easier and quicker to add updates to your CMS.

这篇关于如何自我更新PHP + MySQL CMS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆