1 shopnc 之模式:
 2  shopnc一般的url访问为:http://localhost/shopnc1/admin/index.php?act=sui&op=hello
 3 Controller:
 4 控制器存放于\shopnc1\shop\control\xxx.php中  如 admin/control /sui.php 后台首页
 5 
 6 class suiControl extends SystemControl {
 7  function __construct(){
 8   parent::__construct(); 
 9   }
10   public function helloop() { 
11  $model = Model(); 
12  $brand_list = $model->table('area')->where(array('area_id'=>1))->select(); //print_r($brand_list);
13  //exit; echo '111'; 
14   $str = 'wertyuiosdfgthyujkl;fghjkl'; 
15  Tpl::output('brand_list',$brand_list); 
16  Tpl::output('guo',$str);
17 Tpl::showpage('hello');
18   } }
19 2. Model:模型文件存放于\data\model 文件夹中,其中核心类db存放于\core\framework\db中
20 
21 3.view:显示页面shopnc1\shop\templates\default\   hello.php,注意控制器赋过来的变量 $output['brand_list'],前面加output
22  

 

posted on 2016-11-14 11:37  上善若水-随  阅读(302)  评论(0编辑  收藏  举报