|
Posted by feo on 10/06/02 11:36
header ( 'Content-Type: ' . image_type_to_mime_type ( $img ) );
readfile ( $img );
$img is the relative path to the image file. Let's say you use this tree:
/directory_for_everything
/directory_for_everything/directoryforstoringimages
/directory_for_everything/directoryhttpexposed
If your script is stored in the last directory, then $img =
'../directoryforstoringimages/nameofimage';
Hope it helps.
feo
"Jameson" <jameson_ray@comcast.net> escribiσ en el mensaje
news:1136134747.652428.106160@g44g2000cwa.googlegroups.com...
> Happy New Year, Everyone!
>
> I am trying to figure out how to display a bunch of images (mainly
> JPEGs, but possibly a few GIFs and PNGs as well) that are stored in a
> local directory on the system. I can do this with the glob() function,
> but I can't seem to put in a directory other than one within the
> webroot. For example, I can only put "/uploads" and not
> "/Volumes/jray/Pictures...".
>
> Any ideas how to get around this? If I can't use the glob function,
> it's fine, but I only want images to be displayed (and not any other
> file that happpens to be stored in that directory).
>
> Thanks in advance!
>
Navigation:
[Reply to this message]
|