Re: file_exists

From: Date: Wed, 14 Nov 2007 07:57:49 +0000
Subject: Re: file_exists
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-264476@lists.php.net to get a copy of this message
Ronald Wiplinger wrote:
I am having troubles with the function file_exists() I tried the full path like:
you are missing a closing parenthesis on your condition if (file_exists('/srv/www/....../images/pic412.jpg') ) {
if (file_exists('/srv/www/....../images/pic412.jpg') {
    echo "<IMG SRC='images/pic412.jpg'>";
} else {
    echo "&nbsp;"                   //    picture is missing!
} No matter if I use the full path or just images/pic412.jpg, it always shows the picture is missing! The file exist there! How can I do it? I want that in case the picture is really missing, a blank will be shown. bye Ronald
-- Jim Lucas "Perseverance is not a long race; it is many short races one after the other" Walter Elliot "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare

« previous php.general (#264476) next »