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.
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.