12 php thinkphp cache,upload getfield 自動完成以及各方法大全
来源:互联网 发布:ie不运行java 编辑:程序博客网 时间:2024/05/02 13:57
1.cache即S方法
2.快速缓存F方法
S('a','$value',300) 存缓存, cache('a',$value,array('type'=>'file','expire'=>300))
$value = cache('a')取缓存
cache('a',null)删缓存,
F('data',$Data);
$Model->cache(true)->select();
F('User/*',NULL) 批量刪除
3.查詢緩存
$Model->cache(true,60,'xcache')->select()
4.靜態緩存
要使用静态缓存功能,需要开启HTML_CACHE_ON
'read'=>array('{id}','60')
5.upload
public function upload() {
import('ORG.Net.UploadFile');
$upload = new UploadFile();// 实例化上传类
6.getfield
$User = M("User"); // 实例化User对象
// 获取ID为3的用户的昵称
$nickname = $User->where('id=3')->getField('nickname');
7.靜態定義賀自動完成
protected $_auto()/$rulses = array ( array(),array()...
$User->auto($rules)->create()->add();
8.導入資源
<import file="Js.Util.Array,Js.Util.Date" />
<include file="Public:header" />
0 0
- 12 php thinkphp cache,upload getfield 自動完成以及各方法大全
- thinkphp getField
- thinkphp getField( )和field( )
- thinkphp的getField方法
- ThinkPHP之getfield详解
- thinkphp getField( )和field( )
- thinkphp getField( )和field( )
- ThinkPHP的Upload.class.php解析
- thinkphp Upload
- Thinkphp中field和getField
- Thinkphp的缓存(Cache)以及S函数
- thinkphp核心源码注释|Cache.class.php
- ThinkPHP 中 模型 getField 方法使用
- thinkphp中field()和getfield()区别
- thinkphp 中getfield的用法详解
- [php] Thinkphp自动验证和自动完成
- Android Handler 机制以及各方法所在线程原理分析
- [李景山php]thinkphp核心源码注释|Cache.class.php
- Linux下IP冲突检测程序源码及分析(利用免费arp)---感谢原作者
- hdu 1561 The more, The Better (树形dp+背包)
- 类簇
- Vbox中Ubuntu和win7主机文件共享
- 为什么调用 FragmentPagerAdapter.notifyDataSetChanged() 并不能更新其 Fragment?
- 12 php thinkphp cache,upload getfield 自動完成以及各方法大全
- 模态视图PresentRotation
- 票房与大片
- CodeForces 379A. New Year Candles
- Unity3D中常用的数据结构总结与分析
- POJ 1321 棋盘问题(DFS)
- hiveSQL记录
- Git常用命令
- 关于EOF和feof()判断文件读到末尾