WordPress.org

Support

Support » How-To and Troubleshooting » Access directory above root (www)?

Access directory above root (www)?

  • Leo Blanchette
    Member

    @leoclipartillustrationcom

    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Bartel
    Member

    @andrew-bartel

    Just specify the directory. /home/user/whatever

    Leo Blanchette
    Member

    @leoclipartillustrationcom

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

    Andrew Bartel
    Member

    @andrew-bartel

    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.

    Leo Blanchette
    Member

    @leoclipartillustrationcom

    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…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Access directory above root (www)?’ is closed to new replies.