Model view controller http请求对象的url
我需要像这样转换字符串:Model view controller http请求对象的url,model-view-controller,zend-framework,zend-route,Model View Controller,Zend Framework,Zend Route,我需要像这样转换字符串: $url = 'module/controller/action/param1/param1value/paramX/paramXvalue'; $request = new Zend_Controller_Request_Http(); // some code here passing the $url Zend_Debug::dump($request->getControllerName()); // null instead of 'controll
$url = 'module/controller/action/param1/param1value/paramX/paramXvalue';
$request = new Zend_Controller_Request_Http();
// some code here passing the $url
Zend_Debug::dump($request->getControllerName()); // null instead of 'controllers'
Zend_Debug::dump($request->getParams()); // null instead of array
关于当前路由器的url(包括翻译等)
通常我使用url视图帮助器生成目标url,但为此我需要指定所有参数,因此需要手动分解字符串。我尝试使用请求对象,如下所示:
$url = 'module/controller/action/param1/param1value/paramX/paramXvalue';
$request = new Zend_Controller_Request_Http();
// some code here passing the $url
Zend_Debug::dump($request->getControllerName()); // null instead of 'controllers'
Zend_Debug::dump($request->getParams()); // null instead of array
但这似乎值得怀疑。我需要发送此请求吗
如何处理好这种情况?我在ZF中没有找到任何用于此任务的类
我刚解开了绳子,这也没问题。你好,你有空工作吗?如果是这样,我怎样才能联系到你?(回复后将删除此评论)