摘要: 主要用于在redis server端执行lua脚本lua_test();function lua_test(){ $start_time = microtime(true); $local_server = array('host' => '127.0.0.1','port' => 6379, ); $redis = new redis(); $local_result = $redis->connect($local_server['host'], $local_server['port']); 阅读全文
posted @ 2014-04-02 16:30 白菜小馒头 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 在REST风格结构中,所有的请求都必须在一个由path指定的具体地址的对象上执行。例如,如果用/schools/代表一系列学校的话,/schools/1代码id为1的那所学校,需要注意的是,对象是可以嵌套的,例如可以用/schools/1/class/5代表id为1的学校中,班级id为5的那个班,依次类推。REST的操作分为以下几种:GET:获取对象的当前状态;POST:改变对象的状态;PUT:创建对象;DELETE:删除对象;HEAD:获取对象的基本信息。 阅读全文
posted @ 2014-04-02 15:21 白菜小馒头 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 安装1、curl-Ohttp://redis.googlecode.com/files/redis-2.6.13.tar.gz2、tar zvxf redis-2.6.13.tar.gz3、cd redis-2.6.134、make (如果报错zmalloc.h:50:31: error: jema... 阅读全文
posted @ 2014-04-02 15:19 白菜小馒头 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 下载linux版本的PHP安装版、PHP源码、php-devel测试个demo命令行下:进入源码目录下得ext执行1、./ext_skel --extname=test2、编辑/ext/test/config.m43、去掉 PHP_ARG_ENABLE(int_ext, whether to enable int_ext support 和 [ --enable-int_ext Enable int_ext support]) 两行前面的dnl 4、.h文件.c文件修改PHP_FUNCTION(say_hello) { RETURN_STRINGL("hello worl... 阅读全文
posted @ 2014-04-02 12:34 白菜小馒头 阅读(520) 评论(0) 推荐(0) 编辑
摘要: 使用系统自带的php,apache,通过网上LAMP教程配置基本的web环境PHP性能查看工具:xhprof页面工具:sudo port install graphviz安装Xcode,command line tools安装gitredis.so下载(克隆)git clone https://github.com/nicolasff/phpredis.gitphpize./configure --with-php-config=/usr/bin/php-configmake 安装扩展redis.so 阅读全文
posted @ 2014-04-02 12:26 白菜小馒头 阅读(235) 评论(0) 推荐(0) 编辑