开发者

two parameters in one url

开发者 https://www.devze.com 2023-02-18 07:40 出处:网络
Can I have two params in one url such as: localhost/post/image/开发者_开发技巧id/something/else/value

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

精彩评论

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

关注公众号