View Full Version : PHP, download from any drive?
04-01-2006, 05:06 PM
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
Just symlink (or the equivalent) the file to somewhere under the server root.
04-02-2006, 04:52 AM
symlink? o_O wth is dat @_@ lol, sorry I'm a little new to php =\
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?
04-02-2006, 01:01 PM
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
04-03-2006, 01:37 AM
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:
Alias /images "D:/My Images"
a request for
would return the file,
There are two things to note:
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).
It may be necessary to explicitly grant access to an aliased directory. Continuing the previous example,
<Directory "D:/My Images">
Allow from all
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.
04-03-2006, 02:41 AM
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
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.