Thanks!
I used a slight different version where I first set a variable containing
the file location info as follows:
> Thank you!
> if(file_exists(IMAGES_DIR. 'upload' . DS . 'filename')) worked for
> me.
> Thank you once again:-))
>
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Thank you!
if(file_exists(IMAGES_DIR. 'upload' . DS . 'filename')) worked for
me.
Thank you once again:-))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake
On Sep 4, 5:33 pm, Anna P <[EMAIL PROTECTED]> wrote:
> OK so how to use it? When I try
> if(is_file("../img/upload/photo_file1_".$item['Item']
> ['id'].".jpg")): (the path, which just gives me the right
> image)
> it doesn't work as well.
Hi,
2 tips:
1) You need an absolute path to the fil
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 think
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 m
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'].".j
On 9/4/07, Anna P <[EMAIL PROTECTED]> wrote:
>
> OK so how to use it? When I try
> if(is_file("../img/upload/photo_file1_".$item['Item']
> ['id'].".jpg")): (the path, which just gives me the right
> image)
> it doesn't work as well.
>
I think you will have to experiment with figuring out what
OK so how to use it? When I try
if(is_file("../img/upload/photo_file1_".$item['Item']
['id'].".jpg")): (the path, which just gives me the right
image)
it doesn't work as well.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goo
There is a problem with this statement.
>>if(is_file($this->webroot."img/upload/photo_file1_".$item['Item']['id'].".jpg")):
Chris is right, Above statement gives you the path readable by browser
not the filesystem bcoz of '$this->webroot.'
Ketan
Anna P wrote:
> Hi. I have problem with web photo
On 9/4/07, Anna P <[EMAIL PROTECTED]> wrote:
>
> Hi. I have problem with web photo gallery for a store.
> Photos are uploaded by CMS. They are stored in webroot/img/upload and
> their name is like "photo_file1_{item_id}", "photo_file2_{item_id}",
> etc.
>
> The problem is when I try to display pho
Hi. I have problem with web photo gallery for a store.
Photos are uploaded by CMS. They are stored in webroot/img/upload and
their name is like "photo_file1_{item_id}", "photo_file2_{item_id}",
etc.
The problem is when I try to display photos and first I want to check
if the item of the store has
11 matches
Mail list logo