List files from directory not in apache web directory
am 04.04.2008 11:17:06 von froditus
Hello everyone,
is it possible to list files from directory other than in apache web
directory?
my web folder is placed on c:/ and i put my files in windows directory
"d:/files/images/".
I want those files to be able to view in client browser. when i tested
using server computer it succeed. but from client computer i got
nothing.
I checked the html sources and the files is directly loaded from "d:/
files/images/file_name.jpg" and then i found out why computer client
could not load that files.
is there any other way to make it happened ?
thank you guys for any kind of help.
best regards.
Re: List files from directory not in apache web directory
am 04.04.2008 11:41:24 von George Maicovschi
On Apr 4, 12:17 pm, froditus wrote:
> Hello everyone,
>
> is it possible to list files from directory other than in apache web
> directory?
> my web folder is placed on c:/ and i put my files in windows directory
> "d:/files/images/".
> I want those files to be able to view in client browser. when i tested
> using server computer it succeed. but from client computer i got
> nothing.
> I checked the html sources and the files is directly loaded from "d:/
> files/images/file_name.jpg" and then i found out why computer client
> could not load that files.
>
> is there any other way to make it happened ?
>
> thank you guys for any kind of help.
>
> best regards.
It will not be accessible from the client computer because apache
cannot interpret the path.
You should build a php script that gets a parameter, let's say
'file_name.jpg' and goes and fetches it and than outputs it (using
gd). The script should know the image folder, and not $_GET it,
because that might be a security risk.
Cheers,
George.
Re: List files from directory not in apache web directory
am 05.04.2008 20:15:58 von Michael Austin
froditus wrote:
> Hello everyone,
>
> is it possible to list files from directory other than in apache web
> directory?
> my web folder is placed on c:/ and i put my files in windows directory
> "d:/files/images/".
> I want those files to be able to view in client browser. when i tested
> using server computer it succeed. but from client computer i got
> nothing.
> I checked the html sources and the files is directly loaded from "d:/
> files/images/file_name.jpg" and then i found out why computer client
> could not load that files.
>
> is there any other way to make it happened ?
>
> thank you guys for any kind of help.
>
> best regards.
html sources? post the code snippet on how you read the d:... directory.
I use something like this which creates a dropdown list of files in a
specific directory not under the htdocs directory structure:
echo "