Php include file outside web root




















The most important thing is that you put any credentials you have outside of the document root database logins, etc. Everything else really is secondary and doesn't matter that much.

Third party libraries are in library. Theoretically, if you just stick a. Taking them out of the server root; however, keeps them from be accessed ever by someone who is browsing your website. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Storing script files outside web root Ask Question. Asked 11 years, 7 months ago. I do have a live website up, but it is v1. I have heard that is both easier to use, and more robust. It will mean that I will need to learn how to manage the Server more so myself, and possibly use SSH, and do things like create folders outside of the Web Root.

Should I start a new thread? Easy for you to say!! Sure, start a new thread. How to Include outside Web Root? So, here is what I need help with… 1. This creates a problem in that I cannot have similar directory structures between Dev and Prod. The second is a much better alternative. Hardcoding server paths is often a bad idea. Well in that case, the second option worked just as fine, so I'll go with that one — user I put the secured data in the file named conn.

Dark Star Dark Star 1 1 1 bronze badge. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. I see in some security manuals that placing php include files outside the web root. When I ftp into my web site set up on Ubuntu I can place the folder containing the includes there but how do I access them via a php script. I can not figure out how to declare the path to that folder.

Or you use a relative path like.. I figured out : dd I figured out the dd, but I still can not get to the includes in the private folder.



0コメント

  • 1000 / 1000