Yii: app () solution

Source: Internet
Author: User
Yii: The yii Framework used by the app () solution company has followed the learning process. However, I have never understood it in a few places. I hope there is such a method & nbsp; yii :: app ()-& gt; user-& gt; com_id & nbsp; yii: app ()-& gt; user-& gt; real_name yii: app ()
The yii Framework used by the company has followed the learning process, but I have never understood it in a few places.

There is a method like yii: app ()-> user-> com_id yii: app ()-> user-> real_name
This user table is a data table we have added, so the method here is not the default for yii, but I have not found where to write it, there are many similar to yii: app () the following method

The second problem I saw on the official website is that control is all placed on the protected/control Template page in protected/views, but I found that my project is also different, first, some Controller files are included in protected/control, however, a file named protected/modules is added, and the member and memadmin foreground and background files are placed in the controllers folder and views folder, and a MemberModule is added. php files are placed in the front-end control file. the back-end control file also has a template page. I really don't understand how these files are set, how to separate them, and where to set them, if I cannot understand the distribution of these files on a complete website, please kindly advise.
------ Solution --------------------
1. user table problems
Yii abstracts a class for each table. you can see this in print_r (yii: app ();
2. the directory distribution of yii is his/her conventions, for example, 6 ~ The description of each directory is displayed on page 7.
3. yii organizes code by project. Generally, the website has both the front-end and back-end services.
This is clearly not the case for your company's website, that is, you have changed the default settings and mixed the two projects. Therefore, the directory layout is adjusted to avoid conflicts.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.