作者:小鱼的互联网观察
发布时间:June 14, 2016
分类:互联网观察
修改,thinkcontroller
$map[$key] = array('like','%'.$_GET[$key].'%');
作者:小鱼的互联网观察
发布时间:June 13, 2016
分类:互联网观察
修改 user config 文件
增加:define('DB_CONFIG2', 'mysql://root:[email protected]:3306/xxxx'); // 数据库连接,使用Model方式调用API必须配置此项
修改admin common config 文件
数据库配置增加'DB_CONFIG2'=> 'mysql://root:[email protected]:3306/xxxx', // 数据库连接,使用Model方式调用API必须配置此项
作者:小鱼的互联网观察
发布时间:June 2, 2016
分类:互联网观察
数据函数(http://xcache.lighttpd.net/wiki/XcacheApi)
mixed xcache_get(string name)
bool xcache_set(string name, mixed value [, int ttl])
bool xcache_isset(string name)
bool xcache_unset(string name)
bool xcache_unset_by_prefix(string prefix)
//低版本没有这个函数,使用之前要测试一下
int xcache_inc(string name [, int value [, int ttl]])
//自增函数,value为步长,如果没有初始化,则默认为零,ttl为过期时间
int xcache_dec(string name [, int value [, int ttl]])
//自减函数,同上
注意:xcache不能存放对象、资源等内容。
2、管理函数:
int xcache_count(int type)
//type值定义为宏,返回值为把指定的共享内存分为多少份,见xcache.count配置参数
XC_TYPE_PHP: Cache Type = php opcode XC_TYPE_VAR: Cache Type = variable data array xcache_info(int type, int id)
//返回值:为数组:
array xcache_list(int type, int id)
//返回值:
- array(2) {
- ["cache_list"]=> //缓存列表
- array(78) {
- [0]=>
- array(7) {
- ["size"]=> //大小
- int(107952)
- ["refcount"]=> //引用次数
- int(0)
- ["hits"]=> //命中次数
- int(0)
- ["ctime"]=> //创建时间
- int(1306710407)
- ["atime"]=> //存在时间
- int(1306710407)
- ["hvalue"]=>
- int(1257)
- ["name"]=> //名称
- string(9) "my_var100"
- }
- [1]=> ......
- ["deleted_list"]=> //删除列表
- array(0) {
- }
- }
void xcache_clear_cache(int type, int id)
string xcache_coredump(int op_type)
- 页码: