开发者

What is the best practice for creating a hosted PHP appliacation

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 b开发者_开发知识库e 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.


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 would will get into if when 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.

  • Keep one copy of your code base that all users use.
  • Make that code multi-user aware and dynamically pull its settings from somewhere for each user.
  • The best solution for this somewhere is a database.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜