创建托管 PHP 应用程序的最佳实践是什么
我目前正处于创建 PHP 应用程序的最后阶段,我打算将其作为托管应用程序出售。
这些应用程序实际上是一个文件管理器,不会回复任何数据库。
我的问题是,托管此应用程序的最佳方法是什么。
我最初的想法是拥有一个包含托管应用程序文件的 ZIP 文件,然后当用户注册时,此 zip 将被提取到他们的用户文件夹( http://domain.com/username ),然后将编辑此目录中的配置文件以反映其设置。
这是否太过分了?是否有更实际的方法来做到这一点?
任何帮助/建议将不胜感激。
谢谢。
I am currently in the final stages of creating a PHP application which I intend to sell as a hosted application.
The apps is effectively a file manager and does not reply on any DB.
My question is, what would be the best way to go about making this apps hosted.
My initial idea was to have a ZIP file containing the files of the hosted app, then when a user signed up this zip would be extracted to their user folder ( http://domain.com/username ), and the config file within this directory would then be editied to reflect their settings.
Is this overkill? If there more practical ways of doing this?
Any help / suggestions would be much appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能最不想要的就是为每个新用户积累一个新文件,更不用说为您的代码库创建一个完整的新副本。想象一下,当您需要修复错误并且有 1000 个代码库副本时,您
会将会陷入if的混乱之中。您的应用程序无需数据库即可运行,这很好,但这在多用户设置中非常不切实际。The last thing you possibly want is to accumulate a new file for each new user, much less a complete new copy of your code base. Just imagine the mess you
wouldwill get intoifwhen you need to fix a bug and have 1000 copies of your code base floating around. It's great that your app works without a database, but that's pretty impractical in a multi-user setup.您不应该为每个用户复制代码。您想要做的是创建应用程序的一个实例,并赋予它独立处理多个用户的能力。给它一个登录系统,以便用户可以登录并管理/上传他们的文件。
You shouldn't copy the code for every user. What you want to do is create one instance of the application, and give it the capability to handle multiple users independently. Give it a login system so that users can log in and manage/upload their files.