zoukankan      html  css  js  c++  java
  • ShopNC小实例

     1 shopnc 之模式:
     2  shopnc一般的url访问为:http://localhost/shopnc1/admin/index.php?act=sui&op=hello
     3 Controller:
     4 控制器存放于shopnc1shopcontrolxxx.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:模型文件存放于datamodel 文件夹中,其中核心类db存放于coreframeworkdb中
    20 
    21 3.view:显示页面shopnc1shop	emplatesdefault   hello.php,注意控制器赋过来的变量 $output['brand_list'],前面加output
    22  
  • 相关阅读:
    Matlab之画图
    Evaluation
    Matlab之文件读写
    Matlab之cell使用
    Windows装机指南
    C之文件读写
    Linux之用户管理
    linux和Windows下文本格式转换
    round()
    pow()
  • 原文地址:https://www.cnblogs.com/boundless-sky/p/6061257.html
Copyright © 2011-2022 走看看