Zend框架动作参数
我想将整个路径作为操作参数传递给我的控制器操作。
mycontroller/myaction/myparameter/path_value
例如path_value 可能类似于 test/folder/folder2
我不想对参数进行 urlencode。在我的控制器操作中,我是否可以获取整个路径作为“myparameter”的参数值(因此,“test/folder/folder2”),而不仅仅是“test”。
我希望我说得足够清楚。提前Tnx
I want to pass an entire path as an action parameter to my controller action.
mycontroller/myaction/myparameter/path_value
e.g. path_value could be something like test/folder/folder2
I do not want to urlencode the parameter. Is it possible that in my controller action I can get the entire path as the parameter value for 'myparameter' (so, 'test/folder/folder2') instead of only 'test'.
I hope I am clear enough. Tnx in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将其传递为?myparameter=test/folder/folder2
You can pass it as
<baseurl>?myparameter=test/folder/folder2
您必须修改 Zend 的路由才能执行您尝试的操作。对路径进行编码对您来说可能要简单得多。我想您可以将此变量作为 POST 而不是 GET 发送。
You will have to modify Zend's routing in order to do what you are attempting. Encoding the path may be much simpler for you. I suppose you could send this variable as a POST rather than a GET.