Web-Developer's Project Template Directory

后端 未结 11 1274
予麋鹿
予麋鹿 2021-01-30 03:18

IMPORTANT: The accepted answer was accepted post-bounty, not necessarily because I felt it was the best answer.


I find myself doing things over an

11条回答
  •  长发绾君心
    2021-01-30 04:21

    I think what you have here is great.... What you've listed is of course all about the public front end of your app. My only addition to this, is to keep all your backend code and source out of the public web space if possible, as the less things you have in the public space, the more secure your app is.

    So I'd suggest you take your entire tree, and put it in:

    httpdocs/(all you had in your project template folder)
    

    then put all your backend code (e.g. php libraries, sql files, etc) in adjacent subdirectories:

    httpdocs/(all you had in your project template folder)
    phplibs/
    sql/
    

    etc.

    And, even for your front end stuff, make sure you don't copy in any example files that may come with your front end libraries, as the examples themselves may have security problems that would allow people to XSS or otherwise compromise your site.

提交回复
热议问题