ShopNC小实例
shopnc 之模式:
shopnc一般的url访问为:http://localhost/shopnc1/admin/index.php?act=sui&op=hello
Controller:
控制器存放于\shopnc1\shop\control\xxx.php中 如 admin/control /sui.php 后台首页 class suiControl extends SystemControl {
function __construct(){
parent::__construct();
}
public function helloop() {
$model = Model();
$brand_list = $model->table('area')->where(array('area_id'=>1))->select(); //print_r($brand_list);
//exit; echo '111';
$str = 'wertyuiosdfgthyujkl;fghjkl';
Tpl::output('brand_list',$brand_list);
Tpl::output('guo',$str);
Tpl::showpage('hello');
} }
2. Model:模型文件存放于\data\model 文件夹中,其中核心类db存放于\core\framework\db中 3.view:显示页面shopnc1\shop\templates\default\ hello.php,注意控制器赋过来的变量 $output['brand_list'],前面加output
ShopNC小实例的更多相关文章
- winform 异步读取数据 小实例
这几天对突然对委托事件,异步编程产生了兴趣,大量阅读前辈们的代码后自己总结了一下. 主要是实现 DataTable的导入导出,当然可以模拟从数据库读取大量数据,这可能需要一定的时间,然后 再把数据导入 ...
- CSS应用内容补充及小实例
一.clear 清除浮动 <!DOCTYPE html> <html lang="en"> <head> <meta charset=&q ...
- Objective-C之代理设计模式小实例
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- Objective-C之@类别小实例
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- OC小实例关于init方法不小心的错误
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- canva实践小实例 —— 马赛克效果
前面给大家带来了操作像素的API,此时此刻,我觉得应该配以小实例来进行进一步的说明和演示,以便给大家带来更宽广的视野和灵感,你们看了我的那么多的文章,应该是懂我的风格,废话不多说,进入正题: 这次给大 ...
- canvas实践小实例二 —— 扇形
俗话说:发图不留种,菊花万人捅!我这里想延伸一下:教学不给例,说你是傻逼!哎呀,还挺押韵,嘻嘻,开个玩笑! 我们都讲了四期API的知识了,估计大家看的也是枯燥的很啊,前面的小实例也是太简单,简直不解渴 ...
- canvas实践小实例一 —— 画板工具
前面讲了一部分的canvasAPI的基础知识,光看API的介绍确实是很无趣乏味,需要一点可以激发内心的激情的东西来激励自己来学习,于是就了伴随canvasAPI学习的小实例,这样通过API的知识,结合 ...
- HTML5自学笔记[ 13 ]canvas绘图小实例之方块移动
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
随机推荐
- Spring框架简介 Spring Framework Introduction
Introduction The Spring Framework provides a comprehensive programming and configuration model for m ...
- leetcode_222 Count Complete Tree Nodes
题目: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree fr ...
- CentOS 升级PHP
wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm wget http://rpm ...
- jsp请求乱码问题
首先尝试添加filter,以下是我的自定义filter,实现了Filter接口: package com.deplume.ssm.filter;import javax.servlet.*;impor ...
- paper 101:图像融合算法及视觉艺术应用
1:基于泊松方程的图像融合方法,利用偏微分方程实现了不同图像上区域的无缝融合.比较经典的文章: P. Pérez, M. Gangnet, A. Blake. Poisson image editin ...
- Xamarin
快速建立原生(Native)的行动装置应用程序: 程序代码共享: 与 Visual Studio 整合: 确保第一时间更新: 原生的应用程序效能:
- s3c2440 移值u-boot-2016.03 第3篇 支持Nor flash 识别
当选择,NOR flash 启用时,才可以访问 NOR FLASH ./common/board_r.c 364 line:initr_flash()flash_size = flash_init() ...
- degign new theme for Filezilla(Mac OS X)
the theme directory is located at Filezilla.app/Contents/SharedSupport/resources/ the dirs (excludin ...
- 锁表 for update
select for update 是为了在查询时,避免其他用户以该表进行插入,修改或删除等操作,造成表的不一致性. 举几个例子:select * from t for update 会等待行锁释放之 ...
- MAC: Homebrew(代替yum)安装
安装 ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" 最新方式请 ...