上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 26 下一页

2014年12月25日

mac下wget用来仿站

摘要: wget -c -r -np -k -L -p http://www.domain.com参考 http://www.v2ex.com/t/147870 阅读全文

posted @ 2014-12-25 20:35 walter371 阅读(315) 评论(0) 推荐(0) 编辑

阿里云mysql数据库恢复总结,mysql binlog日志解析

摘要: 由于意外。。阿里云mysql中有一张表被全部删除了,深吸三口气候,开始解决。首先用凌晨的自动备份的,进行全量恢复,然后找binlog日志(见下文),查找从全量备份到数据删除之间的记录这导致了一个问题,为了恢复那一张表,其他的表的数据也回滚到了凌晨备份的事后。。。由于当时比较紧张,而且时间有限,所以考... 阅读全文

posted @ 2014-12-25 13:46 walter371 阅读(4264) 评论(0) 推荐(0) 编辑

thinkphp join 查询

摘要: $user=M('user')->table(C('DB_PREFIX').'user as a')->join(C('DB_PREFIX').'role_user as b on a.uid=b.uid')->where('a.uid='.intval($_GET['uid']))->field(... 阅读全文

posted @ 2014-12-25 10:12 walter371 阅读(288) 评论(0) 推荐(0) 编辑

thinkphp通行证服务,验证登录,注销登录

摘要: where($map)->getField('uid'); // $password=md5($password); //$uid=M("user")->where("username='{$username}' and password='{$passwo... 阅读全文

posted @ 2014-12-25 09:05 walter371 阅读(1175) 评论(0) 推荐(0) 编辑

2014年12月24日

floor舍去法取整

摘要: $int = 0.99999999999999999;echo floor($int); // returns 1$int = 0.9999999999999999;echo floor($int); // returns 0 使用要慎重,详情见php.net 阅读全文

posted @ 2014-12-24 22:14 walter371 阅读(152) 评论(0) 推荐(0) 编辑

range,shuffle,str_shuffle

摘要: print_r(range(1,20));输出,range产生Array( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [... 阅读全文

posted @ 2014-12-24 21:53 walter371 阅读(251) 评论(0) 推荐(0) 编辑

substr,mb_substr,iconv_substr,array_slice

摘要: 通过一个例子来看其关系/**+---------------------------------------------------------- * 字符串截取,支持中文和其他编码+----------------------------------------------------------... 阅读全文

posted @ 2014-12-24 21:24 walter371 阅读(286) 评论(0) 推荐(0) 编辑

php正则表达式判断是否为ip格式

摘要: <?php$a = '127.0.0.111';$b = preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/",$a);var_dump($b);用双引号是因为要使用转移字符\/^ 正则开始标记$/ 正则结束标记/d 非零整数{1,3} 长度... 阅读全文

posted @ 2014-12-24 20:47 walter371 阅读(3820) 评论(0) 推荐(0) 编辑

ThinkPHP/Common/extend.php

摘要: // +----------------------------------------------------------------------// $Id$/** +----------------------------------------------------------------... 阅读全文

posted @ 2014-12-24 20:23 walter371 阅读(511) 评论(0) 推荐(0) 编辑

php protected只能被继承,不可以在实例中调用,parent::调用父类(子类函数的重载对父类的函数没有影响)

摘要: fun2(); } public function fun3(){ echo 'b3'; } public function fun4(){ echo 'b4'; parent::fun3(); }}$b = new b(); ... 阅读全文

posted @ 2014-12-24 10:17 walter371 阅读(1518) 评论(0) 推荐(0) 编辑

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 26 下一页

导航