Thursday, April 4, 2013

Re: having problem using extension(jpg)

Would this URL point to an image or a controller? If image, you have two choices -- put it at:

app/webroot/787198410/still_talking_dark.jpg

or, if you prefer to send the image out through a controller, create a route:

Router::connect(
'/product/:id/:img',
array(
'controller' => 'products',
'action' => 'some_action'
),
array(
'id' => '[0-9]+',
'img' => '[_a-z]+\.jpg',
'pass' => array('id', 'img')
)
);

... and use MediaView to serve up the image.


On Mon, Apr 1, 2013 at 5:00 PM, sara shafaei <sara.shafaei@gmail.com> wrote:
Hi,


I am not actually using still_talking_dark.jpg , but I have to have in my url. It is working when it doesn't have '.jpg' but when I am using .jpg , it says 

The requested resource /product/787198410/still_talking_dark.jpg was not found on this server.

It looks like it doesn't even go through the router. 

I am using php built in server.

I appreciate any help

Thanks,
~Sara 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: