推荐
上一页 1 ··· 6 7 8 9 10 11 下一页

2012年5月9日

查看有没有安装ssh服务器端

摘要: dpkg -l|grep openssh 阅读全文

posted @ 2012-05-09 14:14 高华 阅读(419) 评论(0) 推荐(0) 编辑

2012年4月24日

统计用

摘要: awk -F"\t" '{if($2>1) print $0}' recomlog 阅读全文

posted @ 2012-04-24 12:20 高华 阅读(123) 评论(0) 推荐(0) 编辑

2012年2月20日

curl tauth

摘要: $token=getApiToken(); //echo $token."<br>"; $authString = $uid.":".md5($uid.$token); $authorizationValue = sprintf("Token %s", base64_encode($authString)); //echo $authorizationValue ."<br>"; //echo $url."<br>"; curl_setopt($ch, CUR 阅读全文

posted @ 2012-02-20 11:41 高华 阅读(209) 评论(0) 推荐(0) 编辑

2011年11月10日

常见问题代码

摘要: $k=iconv("utf-8","GBK",$kind[$i]);=》$k=iconv("utf-8","GBK//IGNORE",$kind[$i]);或者是:$k = mb_convert_encoding ( $kind[$i] , 'GBK' , 'UTF-8'); 阅读全文

posted @ 2011-11-10 16:02 高华 阅读(111) 评论(0) 推荐(0) 编辑

php代码规范

摘要: 接口开发规范:1.无bom头2.utf-8编码3.?>后面没有空格或空行4.多写有利于其他人阅读代码的注释,删除多余的注释5.统一管理资源,代码开始处打开资源,结束的地方关闭资源。 这个是针对: 同一个资源,打开,获取,关闭;再打开,获取,关闭。 的逻辑6.能一次性获取的资源,不多次获取(multiget) 针对循环get的情况,multiget可以减少IO7.不获取多余资源(select * from tb) 减小网络传输开销8.返回数据确保是json格式9.尽量代码格式化,为了美观,增加空行,空格或tab键有好的建议欢迎提出 阅读全文

posted @ 2011-11-10 12:15 高华 阅读(141) 评论(0) 推荐(0) 编辑

2011年11月3日

使用curl post数据CURLOPT_POSTFIELDS字符串和array的不同

摘要: curl CURLOPT_POSTFIELDS,可以填入字符串,数组,@文件地址 今天用到这个,发现一个问题,如果使用array, Content-Type会被赋值为multipart/form-dataCURLOPT_POSTFIELDS: The full data to post in a HTTP “POST” operation. To post a file, prepend a filename with @ and use the full path. This can either be passed as a urlencoded string like ‘para1=va 阅读全文

posted @ 2011-11-03 14:36 高华 阅读(1579) 评论(0) 推荐(0) 编辑

2011年11月2日

curl basic认证

摘要: curl_setopt ( $curl, CURLOPT_USERPWD, '用户名:密码' ); 阅读全文

posted @ 2011-11-02 14:54 高华 阅读(1058) 评论(0) 推荐(0) 编辑

2011年10月30日

mc

摘要: set mc,返回false,发现某台mc服务器不能访问 阅读全文

posted @ 2011-10-30 16:29 高华 阅读(99) 评论(0) 推荐(0) 编辑

2011年8月31日

增加路由的方法

摘要: 增加路由规则/sbin/route add -host 172.16.105.49 gw 10.55.28.1查看路由规则/sbin/route -n 阅读全文

posted @ 2011-08-31 18:09 高华 阅读(168) 评论(0) 推荐(0) 编辑

2011年7月4日

json格式,但是不要unicode编码

摘要: 把汉字先urlencode然后再使用json_encode,json_encode之后再次使用urldecode来解码,这样编码出来的json数组中的汉字就不会出现unicode编码了~代码如下//默认为:{"test":"\u6211\u662f\u6d4b\u8bd5"}$array = array( 'test'=>urlencode("我是测试"));$array = json_encode($array);echo urldecode($array);//{"test":" 阅读全文

posted @ 2011-07-04 15:13 高华 阅读(387) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 下一页

导航