Zend framework2 如何定义在Zend Framework 2中首先触发哪个模块
如何定义在Zend Framework 2中首先触发哪个模块,我需要这个,因为我创建了两个模块1>front,另一个是2>admin,我的主文件夹是mysite,所以我的要求是在触发时:Zend framework2 如何定义在Zend Framework 2中首先触发哪个模块,zend-framework2,Zend Framework2,如何定义在Zend Framework 2中首先触发哪个模块,我需要这个,因为我创建了两个模块1>front,另一个是2>admin,我的主文件夹是mysite,所以我的要求是在触发时: http://example.com 它应该点燃前面的模块 我不知道如何调用前端模块控制器 我第一次在任何module.config.php中使用Zend Framework 2- 将路线设置为- 'router' => array( 'routes' => array(
http://example.com
它应该点燃前面的模块
我不知道如何调用前端模块控制器
我第一次在任何module.config.php中使用Zend Framework 2- 将路线设置为-
'router' => array(
'routes' => array(
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/', // due to '/' - http://mysite.net will call the below module's controller - action
'defaults' => array(
'__NAMESPACE__' => 'Application\Controller', //Set the front module name here
'controller' => 'Index', //set the front module's controller name
'action' => 'index', //here the action name
),
),
),
//..... some other routes
)
)
它会很好用的。让我们知道结果以进一步帮助。@Soumik,你应该批准这个答案。@tasmaiski如何批准这个答案,不知道jee爵士。@Soumik,如果你觉得答案有帮助,你可以点击答案左侧的向上箭头
(^)
,向上投票。如果您找到的答案与您想要的完全一致(不仅有用,而且准确),那么您可以单击答案左侧的勾选。@kunaldesh我有一个查询,您给我的解决方案有效,但由于我在主页中搜索,所以我需要搜索参数,以及页面参数来传递url,如何做到这一点,我还需要重定向到控制器如何给出代码,因为使用了“/”,请帮助我。