Yii::app () Solution
The company used the YII framework, and then learned, but there are several places have not understood, hope
There is such a method Yii::app ()->user->com_id Yii::app ()->user->real_name
This user table is our own added data table, then the method here is not the default yii, but I have not found where to write, there are many similar to Yii::app () the following method
The second question I see official online is control all placed in the Protected/control template page is in the protected/views inside, but I found that my project is already different, first in protected/ Control inside a part of the controller file, but added a call Protected/modules folder inside the member and memadmin the foreground and background files inside is Controllers folder and Views folder There is also a membermodule.php file, the control file in the foreground of the control file also has a template page, really do not understand how these files are set, how to separate, where to set, if let me to do a complete Web site These files distribution also do not understand , please enlighten me.
------Solution--------------------
1, User table problems
Yii abstracts a class for each table, you Print_r (Yii::app ()); You'll see
2, Yii directory distribution is his agreement, such as my example of the document 6~7 page has a description of each directory
3, Yii is the project organization code. The general website has the foreground and the backstage, realizes the timeliness as two item to appear
Your company's website is obviously not doing this, that is, you changed the default settings, the two items are mixed together. Therefore, the catalog layout is adjusted to avoid conflicts
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.