Click to See Complete Forum and Search --> : making a link to c: drive instead of base dir of web server


arzoo
03-28-2007, 04:53 AM
Is is possible to provide a link for downloading files in php wherein instead of using "./somedir/somefile.pdf" which points to a file in the webserver directory, make a link so that the source file downloaded is actually in c:?

when you set a variable as $download_dir = "C:\downloads";

this is ok for local machines but when clients in the network click on the link their c: drive doesnt have the file so error comes up.

when you use: $download_dir = "..\downloads";

you get the link pointing to the base dir of the webserver,which isnt right either.

all the files are already in the c:\downloads\ directory.

is there a way so that the c: drive directory may be passed as a link so the clients on the network can download them?

or having to move them to the webserver directories is the only way?

pls. help.

thanks.

DARTHTAMPON
03-28-2007, 08:57 AM
Im pretty sure that the files must be in the webserver directory. For security reasons I would think that you wouldnt want anybody but yourself to have access to your c drive.

MrCoder
03-28-2007, 09:04 AM
openbase_dir

felgall
03-28-2007, 04:38 PM
Not all computers have a C: drive - only those running windoze.

christo16
03-29-2007, 01:05 AM
You could add the C: drive to your webserver like localhost/Cdrive. You would have to edit your httpd.conf file. I think its with the <directory> tag, heres a link http://httpd.apache.org/docs/1.3/mod/core.html#directory