www.webdeveloper.com
Results 1 to 2 of 2

Thread: Provide file for download?

  1. #1
    Join Date
    Aug 2006
    Posts
    37

    Provide file for download?

    Hello again everyone!

    I have a directory full of files which I want to allow my company's employees to download. I have placed them in a directory above the root httpdocs directory, but now I can't figure out how to provide them for downloads. If the files are below the httpdocs root directory then you just give a direct link to them. How do you provide downloads for files above the httpdocs root directory though?

    Thanks in advance.

    CG

  2. #2
    Join Date
    Aug 2005
    Location
    Los Angeles, CA
    Posts
    52
    PHP Code:
    <?php readfile('../../../path/to/file.zip'); ?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles