且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

***的方式来管理,而不数据库动态内容

更新时间:2022-12-31 08:36:30

如果你不想使用一个完全成熟的MySQL服务器时,使用的 SQLite的。这是PHP的一部分,非常轻巧。然后添加缓存在适当情况下。你的其他方法听起来像是在浪费时间给我。太多的精力太少增益。 SQLite的和缓存是经得起考验的。

If you dont want to use a full blown MySQL server, use SQLite. It's part of PHP and very lightweight. Then add caching where appropriate. Your other approaches sound like a waste of time to me. Too much effort for too little gain. SQLite and caching is tried and tested.

此外,你不应该担心资源浪费,除非你是在其上运行的短。您的应用程序犯规听起来它需要在这一点上进行缩放。因此,建立,将工作的最简单的事情。

Besides, you should not worry about waste of resources unless you are running short on them. Your application doesnt sound like it needs scaling at this point. So build the simplest thing that will work.

如果你必须有一个静态页面的方式,然后把所有这些文件到一个符号链接文件夹中。创建生成静态页面到一个新的文件夹(或者通过cron或手动触发),然后更改从旧文件夹中的符号链接到新文件夹的脚本。这样,您就不必担心人们点击你的网站,而其发电量。

If you have to have that static pages approach, then put all those files into a symlinked folder. Create a script that generates the static pages into a new folder (either via cron or manual trigger) and then changes the symlink from the old folder to the new folder. This way you don't have to worry about people hitting your site while its generating content.