开发者

parse the part of url and send to function

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜