On Thursday 10 January 2002 18:19, Dean Householder wrote:
> I'm not sure what function I need to use, but I want to test if a picture
> exists in a directory and if it does to display it but if not display
> another graphic that says 'No Graphic Available'.
> Would that be fopen()? or something else? I'm still new to PHP so any
> feedback would be very appreciated.
Use file_exists() to check whether a file exists.
To check whether is is a valid image file you could use getimagesize().
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Military justice is to justice what military music is to music.
-- Groucho Marx
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]