Home  >  Article  >  Backend Development  >  yii:app()求解解决方法

yii:app()求解解决方法

WBOY
WBOYOriginal
2016-06-13 12:36:18831browse

yii::app()求解
公司用的yii框架,也就跟着学了,可是有几个地方一直没明白,希望

里面有这样一个方法 yii::app()->user->com_id yii::app()->user->real_name
这个user表是我们自己添加的数据表,那么这里的方法也就不是yii默认有的吧,可是我一直没找到在哪里写的,还有很多类似于 yii::app()下面的方法

第二个问题 我看到官网上是control全部放在protected/control 模板页面都是在protected/views里面,可是我发现我的项目也是已经不一样了,首先在 protected/control里面有一部分的控制器文件,但是却添加了一个叫protected/modules文件夹 里面放置了 member 和 memadmin 前台和后台的文件 里面是controllers文件夹和views文件夹 还有一个MemberModule.php文件,分别放前台的control文件后台的control文件 还有模板页面,实在是没搞懂这些文件是怎样设置的,怎样分开的,在哪里设置,如果让我来做一个完整的网站这些文件的分布也搞不懂,请赐教一下

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn