yii-modules

Get all of model names in Yii

孤街浪徒 提交于 2019-12-13 04:33:27
问题 I am creating a module for our web application. I am using Yii 1.1.14. How do I retrieve all of the model names? I tried this but still I got no luck. 回答1: I am not sure if my understanding of your question is correct. If you have to retrieve the name of all your models, then maybe your approach to the problem at hand is not optimal? Anyway here is what i would approach the problem: foreach(glob('./protected/modules/<module-name>/models/*.php') as $filename){ echo str_replace(".php", "",

how to remove module name from url in yii [duplicate]

家住魔仙堡 提交于 2019-12-12 20:25:13
问题 This question already has answers here : Yii - Hiding module name in URL (2 answers) Closed 5 years ago . I try to remove module name from url in YII http://testdomail.com/demo/user/create I want http://testdomail.com/user/create Where demo is my module name. How can I do this? 回答1: You can define any url in your config by making some changes in your configuration file main.php . Please have a look here. 来源: https://stackoverflow.com/questions/24989418/how-to-remove-module-name-from-url-in