Results 1 to 7 of 7

Thread: PHP, download from any drive?

  1. #1
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP, download from any drive?

    My friend scripted in php a well script that could enable to download from anydrive, even though the server root is on the C: drive. I was wondering if you had anything that resembles that, cause my friend won't give it to me and I've tried 3 hours of google searching T.T

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Just symlink (or the equivalent) the file to somewhere under the server root.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    symlink? o_O wth is dat @_@ lol, sorry I'm a little new to php =\

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Symbolic link. On *n?x systems, this would be how I'd do it, anyway. Since the option to follow symlinks exists in the Windows version of Apache, I presume there must be an equivalent. Perhaps making a shortcut?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm shortcuts don't work =\, and I saw a function in php that's called Symlink, but don't quite know how to use it o_O
    Last edited by James-; 04-02-2006 at 01:07 PM.

  6. #6
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Since the option to follow symlinks exists in the Windows version of Apache, I presume there must be an equivalent. Perhaps making a shortcut?
    I wouldn't bet on it. Though shortcuts can be used like symlinks, it doesn't mean that Apache does.

    An Apache alternative is to use the Alias directive. This maps a URL path to a directory. For example, with the directive:

    Code:
    Alias /images "D:/My Images"
    a request for

      http://www.example.com/images/foo.jpeg

    would return the file,

      D:\My Images\foo.jpeg

    There are two things to note:

    1. The Alias directive can only be used in the server configuration file, either as a global setting, or within a virtual host section. It cannot be used in access files (.htaccess).
    2. It may be necessary to explicitly grant access to an aliased directory. Continuing the previous example,

      Code:
      <Directory "D:/My Images">
        Order Allow,Deny
        Allow from all
      </Directory>
    Mike


    P.S. James, sorry for not following up to your other thread. I couldn't find it, for some reason, but it seems like you figured it out.

  7. #7
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yeah Apparently a typo makes a big diffrence at the end of doc_root -_-' lol....got an error with what you said then figured out that I had to add an empty folder with the same name hehe
    Last edited by James-; 04-03-2006 at 09:51 PM.

Bookmarks

Posting Permissions

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