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
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.