更改 yii 中的某些控制器 [英] Change certain controllers inside of yii
问题描述
所以我希望我的 yii 框架应用程序让它的用户控制处理登录名以及名为 Backoffice 的文件夹中的所有内容.我还没有尝试过这个,因为我知道我会关闭网站.
So I want my yii framework application to have its User control handling the login and all of that inside a folder named Backoffice.I haven't tried this yet because I know I will brake the website.
所以我的问题是如何告诉 yii 文件位于不同的目录下
So my question is how to tell yii that the files are located under different directories
推荐答案
您可以在 config/main 文件中设置路径.例如'yiiPath' => 目录名(文件).'/../../framework/yii.php',
或 'import' => 数组('application.models.','application.components.','application.modules.user.models.','application.components.','application.modules.role.models.','application.modules.profile.models.','packages.solr.','application.modules.registration.models.',),
You can set a path in config/main file. For example
'yiiPath' => dirname (FILE). '/../../framework/yii.php',
or
'import' => array(
'application.models.',
'application.components.',
'application.modules.user.models.',
'application.components.',
'application.modules.role.models.',
'application.modules.profile.models.',
'packages.solr.',
'application.modules.registration.models.',
),
这篇关于更改 yii 中的某些控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!