gtanzer Posted May 14, 2006 Share Posted May 14, 2006 I have spent hours and hours and still don't have a clue what I need to do..www.lifeinlegacy.com/list.phpI 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 datafunction ImageExists($image){ if(file_exists("/usr/local/psa/home/vhosts/lifeinlegacy.com" .$image)) return "Yes"; else return "Need Photo";} Quote Link to comment Share on other sites More sharing options...
.josh Posted May 14, 2006 Share Posted May 14, 2006 [code]function ImageExists($image) { if (file_exists("/usr/local/psa/home/vhosts/lifeinlegacy.com" .$image)) { return "Yes"; } else { return "Need Photo"; }}[/code]that is, assuming that the path is correct. Quote Link to comment Share on other sites More sharing options...
toplay Posted May 14, 2006 Share Posted May 14, 2006 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.