ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC...

137
ShopNC B2B2C 2014-1

Transcript of ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC...

Page 1: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

ShopNCB2B2C

2014-1

Page 2: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 3: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

1.

ShopNCB2B2CShopNC2014B2B2C PHP5+MySQL OOPMVC Windows/Unix PHP5.3 ApacheIISNginx

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 4: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 5: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.1

ShopNC MVC ORM CURD SEO

●MVCShopNCB2B2CMVC(M)Model(C)Action(V)TplMVC ShopNCMVCMVC●B2B2C RedisAPCMemcacheeAcceleratorXcache●

●CURD

●LAMP MVC●,●

()WEB●\

()

Page 6: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 7: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 8: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.2

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 9: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 10: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.3

adminchatIMcirclecmsCMSmicroshopshopcoredatamobileAPIwapwapdata>apiAPIdata>cachedata>configdata>crontabdata>logdata>sessionSESSIONdata>uploadcore>frameworkcore>framework>cachecore>framework>corecore>framework>dbcore>framework>functioncore>framework>librariescore>languageshop>installshop>languageshop>control

Page 11: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

shop>templates

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 12: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 13: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.4MVC

ShopNCB2B2CMVCM ModelC ActionV TplMVC ShopNCMVCMVC

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 14: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 15: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.5

ShopNCB2B2Ccontrol actop actop“ index” +“Control” control/brand.phpbrandControlhttp://<siteurl>/index.phpcontrol/index.phpindexOp()http://<siteurl>/index.php?act=brand&op=listcontrol/brand.phplistOp()

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 16: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 17: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.6

ShopNCB2B2CModel CURDModel()$model=Model();$model->table('member')->find(5);//ID5$model->table('brand')->delete(5);//5

$model=Model('member');model/member.model.phpmemberModela) member.model.phpmemberModelselectfinddeleteinsert memberModelModel

classmemberModelextendsModel{publicfunction__construct(){

parent::__construct('member');}////publicfunctionmyfuc(){//

}b) framework/core/model.phpModel$model=Model('member');$model->find(5);//5$model->table('brand')->delete(5);//5 member table()

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 18: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 19: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.7

ShopNCB2B2C mysqlmysqli

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 20: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 21: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.8

Tplcore/framework/libraries/tpl.php templates Tpl TplShopNCB2B2C PHP

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 22: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 23: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.9

framework/functioncore.phpgoods.phprec_position.phpseccode.phpthumb.phpadv.php

frameworklibrariescachecoretpl librarites cache corelibraries/email.phplibraries/cache.phplibraries/gdimage.phplibraries/chat.phpIMlibraries/language.phplibraries/log.phplibraries/page.phplibraries/resizeimage.phplibraries/seccode.phplibraries/security.phplibraries/excel.phpEXCELlibraries/upload.phplibraries/csv.phpCSVlibraries/tpl.php

libraries/model.phpcache/cache.redis.phprediscache/cache.file.phpcache/cache.apc.phpapc

Page 24: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

cache/cache.xcache.phpxcachecache/cache.memcache.phpmemcachecache/cache.eaccelerator.phpeaccelerator

db/mysql.phpmysqlMySQLdb/mysqli.phpmysqliMySQL

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 25: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 26: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.1

control framework/core/base.phpcontrol()actop actop“ index” +“Control” control/brand.phpbrandControl

BaseHomeControlBaseBuyControlBaseMemberControlBaseSellerControl BaseHomeControl<?php/*****...*/defined('InShopNC')orexit('AccessInvalid!');classbrandControlextendsBaseHomeControl{publicfunctionindexOp(){//Language::read('home_brand_index');//$model_brand=Model('brand');

$brand_list=$model_brand->getBrandList();//Tpl::output('brand_list',$brand_list);// Tpl::output('html_title',Language::get('brand_index_brand_list'));//SEOModel('seo')->type('brand')->show();//Tpl::showpage('brand');}

Page 27: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

publicfunctionsearchOp(){/***...*/}}?>http://<siteurl>/index.php?act=brandbrandControlindexOphttp://<siteurl>/index.php?act=brand&op=searchbrandControlsearchOp

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 28: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.2.1

Model()$model=Model();$model=Model('member');model/member.model.phpmemberModel 2.6

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 29: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.2.2

selectfindlimittableorderwherefieldonjoincountpageattrshowpagegetby_getfby_

1.Select nullselectwhere,order,tabale :$model=Model('member');//$model->select();//1, select$model->where(array('member_sex'=>1))->select();SelectID//ID5$model=Model('member');$model->select(5);

2.Find ,findselect$model=Model('member');//ID5$model->where(array('member_id'=>5))->find();FindID$model=Model('member');//ID5$model->find(5);

3.Limit$model=Model('member');$model->limit(4)->select(); //

SELECT*FROMmemberLIMIT4;$model->limit('4,10')->select(); //

SELECT*FROMmemberLIMIT4,10;

Page 30: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.Table$model=Model();//ID5$model->table('member')->find(5);

//memberstore,$on='store.member_id=member.member_id';$model->table('member,store')->join('inner')->on($on)-

>limit(2)->select();table

$model=Model('member');$model->limit(4)->select();//4

5.Order$model->table('member')->order('member_id desc')-

>limit(4)->select();

$model->table('member')->order('member_iddesc,member_sexasc')->select();6.Where sql//$model->where(array('member_id'=>5))->find();//$model->where(array('member_id=5'))->find();//$model->table('member,store');$model-

>where('store.store_id=member.store_idandstore.store_id=2')->find();7.Field field$model->field('member_id,member_name')->select();

8.On

Page 31: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

9.Join () Onjoin$model=Model();//memberstore,ID6$field='member.member_name,store.store_name';$on='store.member_id=member.member_id';$model->table('member,store')->field($field);$model->join('inner')->on($on)-

>where(array('member.member_id'=>6))->find();

$model=Model();//memberstore,store_class,ID6$field='member.member_name,store.store_name,store_class.sc_name'$on='store.member_id=member.member_id,store.sc_id=store_class.sc_id'$model->table('member,store,store_class')->field($field);$model->join('inner,left')->on($on)-

>where('member.member_id=6')->find();10.Count$model=Model('member');//$model->count();//ID15$model->where('member_id>15')->count();

11.Page page( )//10$model=Model('member');//$model->page(10)->order('member_iddesc')->select();//10 1000$model->page(10, 1000)->order('member_id desc')-

>select();wherepage wherepage

Page 32: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

$model->where('id=1')->page(10)->select();//$model->page(10)->where('id=1')->select();//

12.Showpage page//$model->showpage(1);//1$model->showpage(2);//2()

13.Insert IDfalse,insert($data='',$replace=false,$options=array())//link ID$model=Model('table');$data=array(

'link_title'=>'ShopNC','link_url'=>'http://www.shopnc.net','link_sort'=>32,);$model->insert($data);Insert $options$model->insert($data,false,array('priority'=>'DELAYED'));Insertreplace true$model=Model();$data=array('link_title'=>'ShopNC','link_url'=>'http://www.shopnc.net','link_sort'=>32,'link_id'=>30);$model->table('link')->insert($data,true);

14.InsertAll$model=Model('link');$data=array(

array(

Page 33: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

'link_title'=>'','link_url'=>'http://www.sina.com','link_sort'=>32,),array('link_title'=>'','link_url'=>'http://www.baidu.com','link_sort'=>30,));$model->insertAll($data);

15.Delete$model=Model('link');//5$model->delete(5);//$model->where(array('link_id'=>5))->delete();

16.Update$model=Model();//(link_id)37$data=array(

'link_title'=>'ShopNC','link_url'=>'http://www.shponc.net','link_sort'=>32,'link_id'=>37);$model->table('link')->update($data);//$data=array(

'link_title'=>'ShopNC','link_url'=>'http://www.shponc.net',

Page 34: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

'link_sort'=>32);$model->table('link')->where(array('link_id'=>37))-

>update($data);17.Group//$model=Model('goods');$model->field('store_id,count(*)ascount')->group('store_id')-

>select();18.Having group//500ID$model=Model('goods');$model->field('store_id,count(*) as nc_count')-

>group('store_id')->having('nc_count>500')->select();19.Distinct distincttrue,//$model=Model();$model->table('goods')->field('store_id')->distinct(true)-

>select();20.Clear true/false//link$model=Model();$model->table('link')->clear();

21.Query/execute SQL query executeModel()-

>query('SELECT*FROM`shopnc_member`LIMIT10');Model()-

>execute('UPDATE`shopnc_goods`SETgoods_click=1000WHEREgoods_id=2'22.Sum/Avg/Max/Min$model=Model();//

Page 35: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

$model->table('goods')->sum('price');//SQLSELECTSUM(price)ASnc_sumFROM`goods`

//$model->table('goods')->avg('price');//SQLSELECTAVG(price)ASnc_avgFROM`goods`LIMIT1

//$model->table('goods')->max('price');//SQLSELECTMAX(price)ASnc_maxFROM`goods`LIMIT1

//$model->table('goods')->min('price');//SQLSELECTMIN(price)ASnc_minFROM`goods`LIMIT1

23./setIncsetDec$model=Model();//21000$model->table('goods')->where(array('goods_id'=>2))-

>setInc('goods_click',1000);//UPDATE`goods`SETgoods_click=goods_click+3WHERE(goods_id='2')

//exp 1000$model=Model('goods');$data=array('goods_id'=>2,'goods_click'=>array('exp','goods_click-1000'));$model->update($data);// UPDATE `goods` SET goods_click=goods_click-

1000WHERE(goods_id='2')24.getby_getfby_

Page 36: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

getby_+getfby_+

$model=Model('member');//getby_ member_namekevin$model->getby_member_name('kevin');//

SQLSELECT*FROM`member`WHERE(member_name='kevin')LIMIT1//getfby_ member_id6$a = $model->getfby_member_id(6,'member_name'); //

kevin//SQLSELECTmember_nameFROM`shopnc_member`WHERE

(member_id='6')LIMIT125.SQLSQLLOW_PRIORITYDELAYEDHIGH_PRIORITYattr

$model=Model('goods');$model->where(array('goods_id' => 100))-

>attr('LOW_PRIORITY');$model-

>update(array('goods_click'=>array('exp','goods_click+1')));////UPDATELOW_PRIORITY`shopnc_goods`SETgoods_click=goods_click+1WHERE(goods_id='100')

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 37: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.2.3.1

selectfindqueryselect$model=Model('member');//$model->select();//1, select$model->where(array('member_sex'=>1))->select();//ID5$model->select(5);find$model=Model('member');//ID5$model->where(array('member_id'=>5))->find();//$model->find(5);queryModel()-

>query('SELECT*FROM`shopnc_member`LIMIT10');

$model=Model('member');//getby_ member_namekevin$model->getby_member_name('kevin');//

SQLSELECT*FROM`member`WHERE(member_name='kevin')LIMIT1//getfby_ member_id6$a = $model->getfby_member_id(6,'member_name'); //

Page 38: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

kevin//SQLSELECTmember_nameFROM`shopnc_member`WHERE

(member_id='6')LIMIT1

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 39: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.2.3.2

updateexecute$model=Model();//(link_id)37$data=array('link_title'=>'ShopNC','link_url'=>'http://www.shponc.net','link_sort'=>32,'link_id'=>37);$model->table('link')->update($data);//link_id//$data=array('link_title'=>'ShopNC','link_url'=>'http://www.shponc.net','link_sort'=>32);$model->table('link')->where(array('link_id'=>37))-

>update($data);//executeModel()-

>execute('UPDATE`shopnc_goods`SETgoods_click=1000WHEREgoods_id=2'

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 40: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.2.3.3

insertinsertAllexecuteinsert//link ID$model=Model('table');$data=array('link_title'=>'ShopNC','link_url'=>'http://www.shopnc.net','link_sort'=>32,);$model->insert($data);Insert $options$model->insert($data,false,array('priority'=>'DELAYED'));Insertreplace true$model=Model();$data=array('link_title'=>'ShopNC','link_url'=>'http://www.shopnc.net','link_sort'=>32,'link_id'=>30

);$model->table('link')->insert($data,true);insertAll$model=Model('link');$data=array(array('link_title'=>'','link_url'=>'http://www.sina.com','link_sort'=>32,

Page 41: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

),array('link_title'=>'','link_url'=>'http://www.baidu.com','link_sort'=>30,));$model->insertAll($data);executeSQL

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 42: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.2.3.4

deleteclearexecutedelete$model=Model('link');//5$model->delete(5);//$model->where(array('link_id'=>5))->delete();clear//link$model=Model();$model->table('link')->clear();executeSQL

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 43: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.2.4

gt >egt >=lt <elt <=eq =neq !=notlikeNOTLIKElike sqlLIKEbetweensqlBETWEEN[not]insql[NOT]IN

//$condition=array()//uid>5$condition['uid']=array('gt',5);//uid<5$condition['uid']=array('lt',5);//uid=5$condition['uid']=array('eq',5);//uid>=5$condition['uid']=array('egt',5);//uid<=5$condition['uid']=array('elt',5);//uid3,5,19$condition['uid']=array('in','3,5,19');//uid3,5,19

Page 44: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

$condition['uid']=array('notin','3,5,19');//5<=uid<=19$condition['uid']=array('between','5,19');//product_namelike'a%'$condition['product_name']=array(array('like','a%'));//product_namelike'a%'orproduct_namelike'b%'$condition['product_name']=array(array('like','a%'),array('like'//shopnc$condition['member_name|member_trname']=array(array('like'//shopnc$condition['member_name&member_trname']=array(array('like'//"AND" "OR"$condition['_op']='or';//where$list=Model(TABLE)->where($condition)->select();

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 45: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 46: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.3

MVC Tpl setDir output showpage $outputTpl::setDir('home');//templates/default/homeTpl::output('name','shopnc');//Tpl::showpage('index');///templates/default/home/index.phpecho$output['name'];//$output[$var]

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 47: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 48: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.4

config.ini.php$config['debug']=true;

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 49: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 50: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.5

fileredisapceAcceleratormemcachexcacheCache Cache::getInstance//memcache$obj_cache=Cache::getInstance('memcache');//$obj_cache->set('uid',1000);//$obj_cache->get('uid');//$obj_cache->rm('uid');

SEO cache Model('cache')->call()HF H cache/setting.php

H('setting');file

$obj_cache=Cache::getInstance('file')

$obj_cache->get('setting');

HsettingH('setting',true,'file');file

$obj_cache=Cache::getInstance('file')

$obj_cache->rm('setting');setting cache_settingsetting$list=Model('cache')->call($key);

set

Page 51: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

$obj_cache->set($key,$list,null,$expire);trueF H F F PHP FF('setting');//settingF('setting',$data);//$datasetting

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 52: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 53: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.6

1index.html httpDirectoryListing.php

defined('InShopNC')orexit('AccessInvalid!');

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 54: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 55: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.1

[DS]=> /[InShopNC]=>[StartTime]=> 1350096132.6587[TIMESTAMP]=> 1350096132[SHOP_SITE_URL]=>URL[CMS_SITE_URL]=>CMSURL[CIRCLE_SITE_URL]=>URL[ADMIN_SITE_URL]=>URL[MICROSHOP_SITE_URL]=>URL[UPLOAD_SITE_URL]=>URL[RESOURCE_SITE_URL]=>URL[CHARSET]=>UTF-8/GBK[DBDRIVER]=>mysqlimysql[SESSION_EXPIRE]=>[LANG_TYPE]=> zh_cn[COOKIE_PRE]=>cookie[DBPRE]=> shopnc_[ATTACH_PATH]=> upload[ATTACH_COMMON]=> upload/common[ATTACH_AVATAR]=> upload/avatar[ATTACH_STORE]=> upload/store[ATTACH_GOODS]=> upload/store/goods[ATTACH_AUTH]=> upload/auth[ATTACH_MOBILE]=> upload/mobile[ATTACH_LINK]=>logo upload/link[ATTACH_ARTICLE]=> upload/article[ATTACH_BRAND]=> upload/brand[ATTACH_ADV]=> upload/adv

Page 56: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

[ATTACH_ACTIVITY]=> upload/activity[ATTACH_COUPON]=> upload/coupon[ATTACH_WATERMARK]=> upload/watermark[ATTACH_POINTPROD]=> upload/pointprod[ATTACH_SPEC]=> upload/spec[ATTACH_GROUPBUY]=> upload/groupbuy[ATTACH_SLIDE]=> upload/store/slide[ATTACH_VOUCHER]=> upload/voucher[MD5_KEY]=>MD5_KEY

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 57: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.2.1

cookiecookiecookiestringcookie($name='')$namecookie

cookie('uid');encrypt

stringencrypt($txt,$key='')$txt$key

encrypt('password','cb8d4e597fc751a56dc30258c4db1226');//KHEZ1IzRZpLV9Bgdecrypt

stringdecrypt($txt,$key='')$txt$key

decrypt('KHEZ1IzRZpLV9Bg','cb8d4e597fc751a56dc30258c4db1226'); //passwordgetIpIPgetIp()

getReferer

Page 58: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

stringgeReferer()Model

objectModel($model=null)$model $model

$model=Model();//$model=Model('member');redirect

redirect($url='')$url

redirect('http://www.shopnc.net')readDirList

arrayreadDirList($path)$path

readDirList('/var/www/shopnc');//Array([0]=>admin[1]=>cache[2]=>control[3]=>framework[4]=>upload)replaceSpecialChar

Page 59: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

\r\n\t\nstringreplaceSpecialChar($string)$string

setNcCookiecookiesetNcCookie($name, $value, $expire='3600', $path='',

$domain='',$secure=false)$namecookie

$valuecookie$expirecookie 3600$pathcookie /$domaincookie$secureHTTPScookie,false

setNcCookie('uid',1000,2*3600);//2setNcCookie('uid','',time()-3600);//showMessage

showMessage($msg,$url='',$show_type='html',$msg_type='succ',$is_show=1,$time=2000)$msg$url $url array('msg'=>'','url'=>'')$show_type html$msg_typesucc error/$is_show 1$time 2

showMessage('');showMessage('','index.php?act=brand','html','error');showDialog

Page 60: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

AJAXshowDialog($message='',$url= '',$alert_type='error',

$extrajs='',$time=2)

$message$urlURL$alert_typeerror/succ/notice//$extrajsJS$time 2

showDialog('','index.php?act=voucher&op=list');setTimeZone

showDialog($message='',$url= '',$alert_type='error',$extrajs='',$time=2)

$time_zone

setTimeZone(8);//8showEditor

showEditor($id,$value='',$width='700px',$height='300px',$style='visibility:hidden;',$upload_state="true",

$media_open=false)

$idid name$value$width px$height px$style$upload_state

Page 61: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

showEditor('content','','600px','400px','visibility:hidden;','false','false');getDirSize

numericgetDirSize($path,$size=0)

$path$size

$size=getDirSize('d:/root/ssi')/1024;echonumber_format($size,2).'KB';//24.02KBdelCacheFile

index.htmlbooldelCacheFile($dir)

$dir

//cache/fieldsindex.htmldelCacheFile('fields');readFileList()arrayreadFileList($path,&$file_list,$ignore_dir=array())

$path$file_list$ignore_dir

$file_list=array();//cache advsessionindex~shopnc.phpreadFileList(BasePath.'/cache/',$file_list,array('adv','session','index'

Page 62: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

print_r($file_list);//Array(

[0]=>D:/root/ShopNC/trunk/cache/adv_change/index.html[1]=>D:/root/ShopNC/trunk/cache/area/index.html[2]=>D:/root/ShopNC/trunk/cache/brand/index.html[3]=>D:/root/ShopNC/trunk/cache/category/index.html[4]=>D:/root/ShopNC/trunk/cache/class_tag.php[5]=>D:/root/ShopNC/trunk/cache/fields/_pk.php[6]=>D:/root/ShopNC/trunk/cache/goods_class.php[7]=>D:/root/ShopNC/trunk/cache/link.php[8]=>D:/root/ShopNC/trunk/cache/index.html)ncPriceFormat

stringncPriceFormat($price)

$price

echoncPriceFormat(100.256);//100.26echoncPriceFormat(100.2);//100.20ncShopurlstringurlShop($act,$op,$args,$store_domain)$actcontrol$opop$argsurl$store_domain

subdomain

Page 63: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

intsubdomain()ncReplaceText/stringncReplaceText($message,$param)$message$param

str_cut,2

str_cut($string,$length,$dot='')$string$length$dot

request_uri $_SERVER['REQUREST_URI']get_image_type

stringget_image_type($str)C

C($key)string$key

C('site_url')$config['site_url']C('cache.type')$config['cache']['type']defaultGoodsImage

defaultGoodsImage($key)$keysmall/tiny

import"_""#" libraties

Page 64: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

import($libname,$file_ext='.php')$libname$file_ext

import('cache');//require_once(BasePath.'/framework/libraries/cache.php');import('libraries.cache');//require_once(BasePath.'/framework/libraries/cache.php');import('function.core');//require_once(BasePath.'/framework/function/core.php');random

random($length,$numeric=0)$length$numeric10

template

template($tplpath,$project='')$tplpath$project

chksubmitFORM

chksubmit()lazypage

limitstart$delay_eachnumarraylazypage($delay_eachnum,$delay_page,

$count,$ispage=false,$page_nowpage=1,$page_eachnum=1,$page_limitstart=1)$delay_eachnum$delay_page

$count$ispage()

Page 65: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

$page_nowpage$page_eachnum$page_limitstartlimitFF($name,$value='',$path='cache',$ext='.php')$name$value$pathcache$ext

F('setting');//settingF('setting',$data);//$datasettingwrite_file

booleanwrite_file($filepath,$data,$mode=null)$filepath$data$mode“ append”

mk_dir

booleanmk_dir($dir,$mode='0777')$dir$mode

pagecmd

pagecmd($cmd='',$arg='')$cmd$arg

$cmdseteachnum

Page 66: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

settotalnumsetstyleshowobjgettotalnumgettotalpagethrow_exception

throw_exception($error)$error

halt

halt($error)$error

compress_code

compress_code($content)$content

H/H($key, $value='', $cache_type='', $expire=null,

$args=null)$key$value$type file,memcache,xcache,apc,eaccelerator

file$expire$args

H('setting');//H('setting',true);//setting

Page 67: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

H('setting',null);//settingH('setting',true,'file');//settingH('setting',true,'memcache');//settingmemcachercache

rcache($key=null,$prefix='',$unserialize=true)$key$prefix$unserialize

wcache

booleanwcache($key=null,$data=array(),$prefix='',$ttl=0,$prefix='',$serialize=true)

$key$data$ttl$perfix$serialize

rec

stringrec($rec_id=null)$rec_idID

L

stringL($key='')$rec_idID

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 68: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.2.2

thumbURL URL,$config['thumb']['save_type']stringthumb($goods,$type='')$goods$typetiny,small,mid,max

cthumbURL IDURL,$config['thumb']['save_type']stringcthumb($file,$type='',$store_id=false)$file$typetiny,small,mid,max$store_idID URL,

gthumbURLstringgthumb($imgurl='',$type='')$imgurl$typesmall,mid,max$store_idID URL,

orderState

stringorderStateInfo($order_info)$order_info

orderPaymentName

stringorderPaymentName($payment_code)$payment_code

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 69: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 70: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.2.3

makeSeccode

stringmakeSeccode($nchash)$nchash

checkSeccode

booleancheckSeccode($nchash,$value)$nchash

$value

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 71: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.1Model

tableInfo

tableInfo($table)string$table

table

objecttable($table)string$table

order

objectorder($order)string$order

wheresqlobjectwhere($condition)string/array$conditionwhere(array('member_id'=>5)) where('member_id=5')

on

objecton($string)string$stringon('store.member_id=member.member_id')

joinon

objectjoin($string)string$stringjoin('inner')

Page 72: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

limitlimitobjectlimit($string)string$stringlimit(3)limit('3,6')

groupgroupbyobjectlimit($field)string$fieldgroup('store_id')

havinghavingobjecthaving($condition)string$conditionhaving('nc_count>3')

distinctdistinctobjectdistinct()booleantrue/false

page

objectpage($pagesize)integer$pagesize

min

integermin($field)string$field

$model->table('member')->min('member_id')max

min

Page 73: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

count

integercount() $model->where('member_id>23')->count();sum

integersum($field)string$field$model->table('product')->sum('price')

avg

integeravg($field)string$field$model->table('product')->avg('price')

select 3.3find 3.3delete 3.3update 3.3insert 3.3inserAll 3.3execute sql 3.3query sql 3.3clear

clear()$model->table('product')->clear()

getLastIDID

getFields

setInc

Page 74: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

setInc($field,$num)string$field

Int$num$model->where(array('link_id'=>2))->setInc('link_sort',3)

setDec

setDec($field,$num)string$fieldInt$num$model->where(array('link_id'=>2))->setDec('link_sort',3)

clswhere

objectcls()$model->cls()

showpage

stringshowpage($style)string$style 12 3$model->showpage();

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 75: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.2ModelDb

select()buildSelectSql()selectparseValue()parseTable()parseWhere()whereparseWhereItem()whereparseLimit()limitparseJoin()joindelete()deleteupdate()updateparsePriority()SQLclear()insert()getLastId()IDinsertAll()

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 76: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.3Tpl

getInstance()setDir()setLayout()output()showpage()showTrace()traceTpl//Tpl::setDir('home');//Tpl::setLayout('home_layout');//Tpl::output('hot_search',',');//Tpl::showpage('member_profile.avatar');

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 77: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.4Language

getGBK()GBKgetUTF8()UTF-8get()set()read()getLangContent()appendLanguage()Language//Language::read('home_index');//Language::get('pc_title')//if(strtoupper(CHARSET)=='GBK'){$array=Language::getGBK($array);}

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 78: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.5Page

get()set()setPageName()urlsetNowPage()setEachNum()setStyle()setTotalNum()getNowPage()getTotalPage()getTotalNum()getEachNum()getLimitStart()selectgetLimitEnd()selectsetTotalPage()show()

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 79: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.6Security

getToken()checkToken()fliterXss()xssfliterHtmlSpecialChars()&"<>getAddslashesForInput()

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 80: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.7UploadFile

set()get()upfile()fileInputError()setPath()setFileName()setError()getSysSetPath()UploadFile//$upload=newUploadFile();//$upload->set('ifremove',true);//$upload->set('default_dir','upload/'.$upload-

>getSysSetPath());//1M$upload->set('max_size',1024*1024);// 30,300$upload->set('thumb_width','30,300');$upload->set('thumb_height','30,300');//"_tiny","_mid"$upload->set('thumb_ext','_tiny,_mid');//$result=$upload->upfile($v);if($result){//

Page 81: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

$img_path = $upload->getSysSetPath().$upload->file_name;}

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 82: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.8Validate

Validate()Check()setValidate()getError()Validate//$obj_validate=newValidate();$obj_validate->validateparam=array(array("input"=>$_POST["username"],"require"=>"true","message"

'),array("input"=>$_POST["password"],"require"=>"true","message"'),

array("input"=>$_POST["email"],"require"=>"true","validator"Email'),

);$error=$obj_validate->validate();if($error!=''){//showDialog($error);}

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 83: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.9ResizeImage

newImg()initi_img()dst_img()

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 84: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.10Cache

connect()getInstance()set()get()rm()inc()dec()Cache// memcache$obj_cache=Cache::getInstance('memcache');// 1$obj_cache->set('uid_100','',null,3600);//$value=$obj_cache->get('uid_100');//$obj_cache->rm('uid_100');//$obj_cache->clear();//100$obj_cache->set('uid_100',100,null,3600);//50$obj_cache->inc('uid_100',50);echo$obj_cache->get('uid_100');//150//50$obj_cache->dec('uid_100',50);echo$obj_cache->get('uid_100');//100

Page 85: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 86: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3.11Route

parseRule()

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 87: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 88: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.1

ShopNCB2B2C

[1] data/config/config.ini.php[2] data/cache/setting.php

admin/config/config.ini.phpCMS cms/config/config.ini.php

circle/config/config.ini.phpmicroshop/config/config.ini.php

IM chat/config/config.ini.phpdata/api/xs/app/shopnc.ini

[1] redis[2] LOGOQQ

CMSIM[1]

#

defined('InShopNC')orexit('AccessInvalid!');

#

$config=array();

#

$config['shop_site_url']='http://shop.shopnc.net';

#CMS

$config['cms_site_url']='http://cms.shopnc.net';

Page 89: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

#

$config['microshop_site_url']='http://microshop.shopnc.net';

#

$config['circle_site_url']='http://circle.shopnc.net';

#

$config['admin_site_url']='http://system.shopnc.net';

#

$config['upload_site_url']='http://img.shopnc.net';

#css,js,image

$config['resource_site_url']='http://resource.shopnc.net';

#

$config['version']='201401162490';

#

$config['setup_date']='2014-01-2211:06:21';

#gzip

$config['gip']=0;

#,mysqli(),mysql

$config['dbdriver']='mysqli';

#

$config['tablepre']='shop_';

# ( )

$config['db'][1]['dbhost']='192.168.1.10';

$config['db'][1]['dbport']='3306';

$config['db'][1]['dbuser']='root';

Page 90: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

$config['db'][1]['dbpwd']='root';

$config['db'][1]['dbname']='shopnc';

$config['db'][1]['dbcharset']='UTF-8';

# ( )

#

$config['db']['slave']=array();

#

#1

$config['db']['slave'][1]['dbhost']='192.168.1.11';

$config['db']['slave'][1]['dbport']='3306';

$config['db']['slave'][1]['dbuser']='root';

$config['db']['slave'][1]['dbpwd']='root';

$config['db']['slave'][1]['dbname']='shopnc';

$config['db']['slave'][1]['dbcharset']='UTF-8';

#2

$config['db']['slave'][2]['dbhost']='192.168.1.12';

$config['db']['slave'][2]['dbport']='3306';

$config['db']['slave'][2]['dbuser']='root';

$config['db']['slave'][2]['dbpwd']='root';

$config['db']['slave'][2]['dbname']='shopnc';

$config['db']['slave'][2]['dbcharset']='UTF-8';

#N

.............................

# ()1

$config['session_expire']=3600;

# zh_cn()

Page 91: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

$config['lang_type']='zh_cn';

#cookie

$config['cookie_pre']='08A6_';

#

$config['tpl_name']='default';

#gd()imGDimagemagick$config['thumb']['cut_type']='gd';

#convert(imagemagick)imagemagick GD

$config['thumb']['impath']='/usr/local/ImageMagick/bin';

#file()redismemcachexcacheapceaccelerator#memcacheredismemcacheredis

$config['cache']['type']='file';

#memcache memcache

$config['memcache']['prefix']='nc_';//memcached

#1memcached

$config['memcache'][1]['port']=11211;//memcached

$config['memcache'][1]['host']='192.168.1.13';//memcachedIP

$config['memcache'][1]['pconnect']=0;//0()1

#2memcached

$config['memcache'][2]['port']=11211;

$config['memcache'][2]['host']='192.168.1.14';

$config['memcache'][2]['pconnect']=0;

#Nmemcached

.............................

Page 92: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

#redis

$config['redis']['prefix']='nc_';//redis

#redis

$config['redis']['master']['port']=6379;

$config['redis']['master']['host']='192.168.1.15';

$config['redis']['master']['pconnect']=0;

#redis

$config['redis']['slave']=array();

#redis

$config['redis']['slave']['port']=6379;

$config['redis']['slave']['host']='192.168.1.16';

$config['redis']['slave']['pconnect']=0;

# true()false()

#data\api\xs\app\shopnc.iniserver.indexserver.searchIP

$config['fullindexer']['open']=true;

#(shopnc)

$config['fullindexer']['appname']='shopnc';

# true()false()

# SQL

#

#:data/log

$config['debug']=false;

#ID

$config['default_store_id']='1';

# true()false()

Page 93: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

$config['url_model']=false;

# SESSIONCOOKIE

$config['subdomain_suffix']='';

#true()false()

$config['sys_log']=true;

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 94: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 95: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.2

shopnc.net

CONFIGshop_site_url http://www.shopnc.net shop

CMS cms_site_url' http://cms.shopnc.net cmscircle_site_url http://circle.shopnc.net circlemicroshop_site_url http://microshop.shopnc.net microshopadmin_site_url http://system.shopnc.net adminupload_site_url http://img.shopnc.net data/upload

CSS,JS,IMG resource_site_url http://resource.shopnc.net data/resource

www

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 96: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 97: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.3

URL CONFIG(data/config/config.ini.php) url_modeltrueurl_mode false PATHINFO CONFIG APACHE/NGINX

PATHINFO#apache

#httpd.confmod_rewrite.so

#httpd.confApache.htaccess

AllowOverrideNoneAllowOverrideAll

#.htccess

#php-cgi

<IfModulemod_rewrite.c>

RewriteEngineon

RewriteCond%{REQUEST_FILENAME}!-d

RewriteCond%{REQUEST_FILENAME}!-f

RewriteRule^(.*)$index.php[L,E=PATH_INFO:$1]

</IfModule>

#php5apache2_2.dll

<IfModulemod_rewrite.c>

RewriteEngineon

RewriteCond%{REQUEST_FILENAME}!-d

RewriteCond%{REQUEST_FILENAME}!-f

RewriteRule^(.*)$index.php/$1[QSA,PT,L]

</IfModule>

#nginx

location/{

if(!-e$request_filename)

{

rewrite^/(.*)$/index.php;

}

}

Page 98: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

location~\.php${

fastcgi_split_path_info^(.+\.php)(/.+)$;

fastcgi_passunix:/var/run/php5-fpm.sock;

fastcgi_indexindex.php;

includefastcgi_params;

fastcgi_paramPATH_INFO$request_uri;

}

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 99: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 100: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.4

file

redismemcachexcacheapceaccelerator redismemcache

CONFIG(data/config/cofnig.ini.php)[cache][save_type] redisCONFIG#file()redismemcachexcacheapceaccelerator$config['cache']['type']='redis';

memcacheredismemcacheredis#memcached memcached

$config['memcache']['prefix']='nc_';//memcached

#1memcached

$config['memcache'][1]['port']=11211;//memcached

$config['memcache'][1]['host']='192.168.1.13';//memcachedIP

$config['memcache'][1]['pconnect']=0;//0()1

#2memcached

$config['memcache'][2]['port']=11211;

$config['memcache'][2]['host']='192.168.1.14';

$config['memcache'][2]['pconnect']=0;

#Nmemcached

.............................

#redis

$config['redis']['prefix']='nc_';//redis

Page 101: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

#redis

$config['redis']['master']['port']=6379;

$config['redis']['master']['host']='192.168.1.15';

$config['redis']['master']['pconnect']=0;

#redis

$config['redis']['slave']=array();

#redis

$config['redis']['slave']['port']=6379;

$config['redis']['slave']['host']='192.168.1.16';

$config['redis']['slave']['pconnect']=0;

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 102: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 103: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.5

ID

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 104: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.5.1

xunsearch http://www.xunsearch.com/CONFIG(data/config/config.ini.php)

# true()false()

#data\api\xs\app\shopnc.iniserver.indexserver.searchIP

$config['fullindexer']['open']=true;

#(shopnc)

$config['fullindexer']['appname']='shopnc';

data/api/xs/app/shopnc.ini server.indexserver.searchIPshopnc.ini#

project.name=shopnc

#project.default_charset=UTF-8

# 8383

server.index=127.0.0.1:8383

# 8384

server.search=127.0.0.1:8384

#

[pk]

type=id

#ID

[goods_id]

type=numeric

Page 105: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

#

[goods_name]

type=title

index=mixed

weight=5

#

[gc_name]

index=mixed

weight=3

#

[brand_name]

index=mixed

weight=4

#

[cate_1]

index=self

tokenizer=full

#

[cate_2]

index=self

tokenizer=full

#

[cate_3]

index=self

tokenizer=full

#ID

[brand_id]

Page 106: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

index=self

tokenizer=full

#ID

[attr_id]

index=self

tokenizer=split(_)

#ID

[store_id]

index=self

tokenizer=full

#ID

[area_id]

index=self

tokenizer=full

#

[goods_price]

type=numeric

#

[goods_click]

type=numeric

#

[goods_salenum]

type=numeric

#ID

[gc_id]

xunsearch

Page 107: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

#xunsearch

usr/local/xunsearch/bin/xs-ctl.sh-binetstart

#

/usr/bin/php/wwwroot/html/crontab/index.phpxsclear

#

/usr/bin/php/wwwroot/html/crontab/index.phpxscreate

# 1

/usr/bin/php/wwwroot/html/crontab/index.phpxsupdate

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 108: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.5.2

scws, $prefix$prefix/etc/dict_user.txt

xunsearch

● UTF-8● 1~4 (\t)●“”“ (TF)”“ (IDF)”“ (ATTR)”●scws●!● #

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 109: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 110: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.6

Page 111: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 112: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 113: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 114: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.7

Page 115: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 116: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 117: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 118: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.8

Page 119: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 120: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 121: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 122: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

6.

ShopNChttp://www.shopnc.netShopNChttp://bbs.shopnc.net

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 123: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 124: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

2.

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 125: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 126: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 127: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 128: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.2

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 129: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

3.2.3CURD

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 130: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 131: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 132: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 133: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.2

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 134: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 135: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

4.3

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC

Page 136: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache
Page 137: ShopNC B2B2C É̳ǿª·¢ÊÖ²á - documentation.help · 2.1 ShopNC MVC ORM CURD SEO MVC ShopNC B2B2C MVC (M) Model (C)Action (V) Tpl MVC ShopNCMVC MVC B2B2C RedisAPCMemcacheeAcceleratorXcache

5.

Copyright©2009-2014shopnc.net.Allrightsreserved.PoweredByShopNC