开发者

parse the part of url and send to function

开发者 https://www.devze.com 2023-03-04 19:03 出处:网络
I have a controller called customers and the f开发者_开发知识库unction called products. I have link like this

I have a controller called customers and the f开发者_开发知识库unction called products. I have link like this http://mysite.com/customers/products/{customernumber}/imagefile.png

I want to have my function get the imagefile.png once my customer put link in the browser on my site.

Howd I do that with cakephp


Your action called products needs two arguments to deal with that:

function products($customernumber, $image) {
    //here you can access these variables and use them for further processing
}

I hope this was your problem in this case, please comment if you need help on the "getting the image" case.

0

精彩评论

暂无评论...
验证码 换一张
取 消