心 涯

NET&JAVA&PHP(要跨界,你不只要跨「脑」的界限,更要跨越「心」的界限,不怕改变,不怕再学习!)

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  169 随笔 :: 9 文章 :: 66 评论 :: 2 引用

2012年1月30日 #

摘要: mysql> ALTER TABLE `sbear` ADD PRIMARY KEY ( `a_id` , `b_id` ) ;ERROR 1062 (23000): Duplicate entry ’88-501200′ for key ‘PRIMARY’建立联合主键时发现出错,88,501200已经早有多条记录了。主键建立失败,需要删除多余的记录,并且有多组这样的重复记录。 这时候使用“ign...阅读全文
posted @ 2012-01-30 22:03 witer666 阅读(6) 评论(0) 编辑

2011年10月23日 #

摘要: 一、软件包 1.bdb-4.8.26.tar.gz 2.libevent-2.0.15-stable.tar.gz 3.memcacheq-0.2.0.tar.gz 二、安装步骤 1.tar zxvf bdb-4.8.26.tar.gz 2.cd db-4.8.26/ 3.cd build_unix/ 4. ../dist/configure --prefix=/usr/local/...阅读全文
posted @ 2011-10-23 22:54 witer666 阅读(28) 评论(1) 编辑

2011年6月9日 #

摘要: 昨天写PHP代码时为了方便写了一句if(empty(intval($type)))报错,提示“Can't use function return value in write context”,一时有点晕。就改成$type = intval($type) if(empty($type))最后查PHP手册说明empty()中的参数只能是变量。是否PHP可以改进下。上面这种写法也挺美的吧!阅读全文
posted @ 2011-06-09 23:22 witer666 阅读(46) 评论(0) 编辑

2011年5月29日 #

摘要: 一、软件包 a) freetds-stable.gz b) php-5.2.12.tar.gz 二、安装步骤 a) tar zxvf freetds-stable.gz b) cd freetds-0.82/ c) ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 d) Make e) Make install f) Tar zxv...阅读全文
posted @ 2011-05-29 23:02 witer666 阅读(48) 评论(0) 编辑

2011年5月13日 #

摘要: 目录1. 介绍 2. curl扩展的安装 3. curl_init 4. curl_setopt 5. curl_exec 6. curl_close 7. curl_version* 介绍PHP 支持libcurl(允许你用不同的协议连接和沟通不同的服务器)。, libcurl当前支持http, https, ftp, gopher, telnet, dict, file, 和ldap 协议。...阅读全文
posted @ 2011-05-13 19:38 witer666 阅读(73) 评论(0) 编辑

2011年4月28日 #

摘要: 一、软件包 a) libmemcached-0.27.tar.gz b) memcached_functions_mysql-0.9.tar.gz 二、安装步骤 a) Tar zxvf libmemcached-0.27.tar.gz b) Cd libmemcached-0.27 c) ./configure –prefix=/usr/local/libmemcached –with-memca...阅读全文
posted @ 2011-04-28 14:07 witer666 阅读(33) 评论(0) 编辑

2011年4月22日 #

摘要: 一、软件包 a) mongodb-linux-i686-static-1.8.1.tar 二、安装步骤 a) Tar xzf mongodb-linux-i686-static-1.8.1.tar b) Mv mongodb-linux-i686-static-1.8.1 /usr/local/mongodb c) Mkdir –p /data/db //默认数据库存放路径 d) Chown `i...阅读全文
posted @ 2011-04-22 11:35 witer666 阅读(105) 评论(0) 编辑

2011年4月20日 #

摘要: ======================================================== [size=+2]静态调用的成员一定要定义成 static (PHP5 ONLY) 贴士:PHP 5 引入了静态成员的概念,作用和 PHP 4 的函数内部静态变量一致,但前者是作为类的成员来使用。静态变量和 Ruby 的类变量(class variable)差不多,所有类的实例共享同一...阅读全文
posted @ 2011-04-20 20:02 witer666 阅读(33) 评论(0) 编辑

摘要: 一、位运算符C语言提供了六种位运算符: & 按位与 | 按位或 ^ 按位异或 ~ 取反 << 左移 >> 右移 1. 按位与运算 按位与运算符"&"是双目运算符。其功能是参与运算的两数各对应的二进位相与。只有对应的两个二进位均为1时,结果位才为1 ,否则为0。参与运算的数以补码方式出现。 例如:9&5可写算式如下: 00001001 (9的二进制补码)&00000101 (5的二进制补码) 000...阅读全文
posted @ 2011-04-20 19:53 witer666 阅读(65) 评论(0) 编辑

2011年4月19日 #

摘要: 一、软件包 a) pcre-devel-6.6-2.el5_1.7.i386.rpm b) lighttpd-1.4.28.tar.gz 二、安装步骤 a) Rpm –ivh pcre-devel-6.6-2.el5_1.7.i386.rpm b) Tar zxvf lighttpd-1.4.28.tar.gz c) Cd lighttpd-1.4.28 d) ./configure –prefi...阅读全文
posted @ 2011-04-19 16:45 witer666 阅读(104) 评论(0) 编辑