Jump to content

Does the Image exist yes or no


gtanzer

Recommended Posts

I have spent hours and hours and still don't have a clue what I need to do..

www.lifeinlegacy.com/list.php

I want to change the image listing to say yes or no if the picture is uploaded or not.

What am I doing wrong, with this piece of data

function ImageExists($image)
{
if(file_exists("/usr/local/psa/home/vhosts/lifeinlegacy.com" .$image))
return "Yes";
else
return "Need Photo";
}
Link to comment
https://forums.phpfreaks.com/topic/9652-does-the-image-exist-yes-or-no/
Share on other sites

Crayon Violent, the only thing I see different in your post is the use of the curly braces which are optional when you're specifying just one statement to run on an 'if' or 'if-else'.

gail, I assume when function is called $image has a forward slash followed by a filename (i.e. /picfile.jpg or /folder/picfile.jpg), right?

Are you saying you're getting "Need Photo" when you know the file is there?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.