开发者

two parameters in one url

Can I have two params in one url such as:

localhost/post/image/开发者_开发技巧id/something/else/value

where id is a param and something is the value and where else is the param and value is the value.

In zend I can only get the first param via: $this->_getParam('id');

This method doesn't work for the second parameter.

Any ideas?


It should be working fine. Make sure you application.ini and plugins are doing default routing.

Default Zend Route looks like this:

With Out module

domainName/controller/action/var1/value1/var2/value2

With module

domainName/module/controller/action/var1/value1/var2/value2

Check following link for default Zend routes:

http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.default-routes


use ? to separate the variables in the querystring

something like http://localhost/post.php?imgID=1&otherValue=othervalue

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜