I know I'm not helping with the issue at hand, but I got a suggestion: I do something similar. Since you seem to control your filename (not a user uploaded file) then you could just set a boolean field on your controller: image. Then your "if" will just deal with your controller.
I was just thinking that it's got to be better to control the image's existence manually through the database than to check the disk for every single file. Just my 2 cents. -- Baz L Web Development 2.0: Web Design, CakePHP, Javascript http://www.WebDevelopment2.com/ On 9/4/07, francky06l <[EMAIL PROTECTED]> wrote: > > > if(file_exists(IMAGES. 'upload' . DS . 'filename')) > > hope this helps > > On Sep 4, 8:31 pm, Ketan Patel <[EMAIL PROTECTED]> wrote: > > look in cake/config/paths.php, it has most of the general path > > constants that one would need. I think WEBROOT_DIR is what you need, > > however, look in that file for more info. > > > > Ketan > > > > Anna P wrote: > > > OK so how to use it? When I try > > > if(is_file("../img/upload/photo_file1_".$item['Item'] > > > ['id'].".jpg")): (the path, which <img src> just gives me the right > > > image) > > > it doesn't work as well. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---