Results 1 to 2 of 2
  1. #1

    Access File Outside Home Directory

    I have a webpage (PHP) that I wish to be able to link to files outside of the home directory (not accessible to browse to) to download them. Example:

    Downloadable File Location:

    Page I want to link to this file on:

    Anyone have any idea how I can do this? These are files I want to create for each user, but I do not want anyone to be able to browse to this file location folder and download the individual user folders.

  2. #2
    It's been mentioned a few times here. You're storing files below DocumentRoot, and you need to use readfile() with header() in order to serve files that are otherwise unaccessible directly via URL. Search the forums, there's allready the entire code posted, you should just change the paths and you're good to go.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts