WordPress.org

Ready to get started?Download WordPress

Forums

Access directory above root (www)? (5 posts)

  1. Leo Blanchette
    Member
    Posted 1 year ago #

    I need to place protected files above the www directory. They can be downloaded on purchase.

    What is the best way to access the level above www in php?

  2. Andrew Bartel
    Member
    Posted 1 year ago #

    Just specify the directory. /home/user/whatever

  3. Leo Blanchette
    Member
    Posted 1 year ago #

    Great. So that should work on any installation? The /home/user/whatever is consistent among servers?

  4. Andrew Bartel
    Member
    Posted 1 year ago #

    No, not at all, but that's how many shared hosting companies set it up. Just ftp in and check. If you don't have access above the web root though you'll probably have to upgrade your plan with your hosting company.

  5. Leo Blanchette
    Member
    Posted 1 year ago #

    Hahaha! I'd be all over it if it were that simple. Actually I'm making a theme. Best I can think of, if there is no $_SERVER variable is just to get the root and do one of those "../" relative methods.

    Person installs theme...works on every site...

Topic Closed

This topic has been closed to new replies.

About this Topic