ThinkPHP5 Mall Project actual combat video tutorial courseware source sharing

Source: Internet
Author: User
Thinkphp as an open-source PHP framework developed to today, is undoubtedly the most suitable for PHP learners to learn and use the framework, in addition to simple easy to get started, the bigger advantage is the development of documentation, plug-in rich. To meet the conditions as a framework for the development of large and medium-sized Web sites, "ThinkPHP5 Mall Project Video Tutorial" will develop a medium-sized mall as an example, with everyone learning thinkphp core technology.

Course Play Address: http://www.php.cn/course/546.html

The teacher's lecture style:

The teacher lively image, witty witty, witty, touching. A vivid image of the metaphor, like the finishing touch, to the students to open the door of wisdom, a proper sense of humor, attracting students to smile, such as drinking a cup of glycol wine, to the aftertaste and nostalgia, the philosopher's motto, culture of the proverbs from time and again interspersed in the middle, give people to think and alert.

The difficulty in this video is that the thinkphp infinite classification module has been designed:

Unlimited classification, single classification, are supported, adding and removing changes based on thinkphp operation, if everyone is their own database operation can be changed can be, itself module is not the data layer should be written in the module inside, but my project classification is basically these operations, additions and deletions to change, so I wrote directly in the inside, Do not want to repeat to write and delete and change the code.
I have also uploaded two tables here, and the table prefixes are changed to your own. Test.php This code can be used directly within one of the methods of one of the classes in your project Lib.

Public Function Catelist () {        $cate =d (' Cate ');        Var_dump ($cate->gettree ()); exit;        $cateres = $cate->gettree ();        $this->assign (' Cateres ', $cateres);       $this->display ();    }

The above is a very common database display API operation. The data in the database is displayed. To design an infinite classification, first, define a Gettree method in the model layer

Common methods for querying in commodity classifications---infinitely classified public    function Gettree ($p = 0, $lv = 0) {        $t = array (); Loop through the data in the data table, and the loop is a one-dimensional array of        foreach ($this->select () as $k = + $v) {//check if the parent_id of the data at this time =0 if            ($v ['          parent_id '] = = $p) {//Sub-column indent                $v [' lv '] = $LV; Assign the array to $t                $t [] = $v;                Check. Merge Array_merge $t = Array_merge ($t, $this->gettree ($v [' cate_id '], $LV + 1)); }} return $t; }

Here also recommend the source of resources to download: http://www.php.cn/xiazai/learn/2118

1.3_ Courseware

2. Source code

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.