我们可以在 yii 中指定默认控制器和动作 [英] where we can specify default controller and action in yii

查看:15
本文介绍了我们可以在 yii 中指定默认控制器和动作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 yii 中创建了一个项目,我的默认控制器指向站点控制器.我想用其他方法更改它,我可以在 yii 中指定默认控制器和操作.

I have created one project in yii and my default controller points to site controller . I want to change it with some other and where i can specify default controller and action in yii.

推荐答案

在config main.php中添加配置

add the configuration in the config main.php

return array(
    'name' => 'Web Application',
    'defaultController' => 'home', 
    ......
);

这篇关于我们可以在 yii 中指定默认控制器和动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆