Reply to Re: Displaying Images form a Directory

Your name:

Reply:


Posted by feo on 06/19/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!
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация