2017年1月23日

laravel php门面模式

摘要: 门面模式 理解3个概念: 1)Container的概念,laravel所有的服务都注册在container里面,至于如何注册,就是使用service provider 2)service provider是用来绑定具体使用的服务,比如用MySQL数据库,还是Redis数据库,然后使用$this->a 阅读全文

posted @ 2017-01-23 10:42 dongruiha 阅读(798) 评论(0) 推荐(0)

2017年1月22日

js获取当前页面的url地址

摘要: //微信分享的时候要通过这样动态获取url传参,因为微信会对url自动加参数,所以要动态获取,不能写死urlvar page_url = location.href.split('#')[0]; 阅读全文

posted @ 2017-01-22 14:21 dongruiha 阅读(952) 评论(0) 推荐(0)

php编码规范

摘要: Basic Coding Standard Basic Coding Standard This section of the standard comprises what should be considered the standard coding elements that are req 阅读全文

posted @ 2017-01-22 14:07 dongruiha 阅读(457) 评论(0) 推荐(0)

2017年1月20日

laravel console handle 传参方法

摘要: option('uid'); $spe_goo_id = $this->option('spe_goo_id'); $info = array( 'ord_typ_id'=>$ord_typ_id, 'out_trade_no'=>CommonHelper::get_order_sn(), ... 阅读全文

posted @ 2017-01-20 13:54 dongruiha 阅读(1724) 评论(0) 推荐(0)

2017年1月19日

js面向对象写法及栈的实现

摘要: 1 function Stack() { 2 this.dataStore = []; 3 this.top = 0; //指向栈顶的位置 4 this.push = push; 5 this.pop = pop; 6 this.peek = peek; 7 this.clear = clear; 阅读全文

posted @ 2017-01-19 16:53 dongruiha 阅读(578) 评论(0) 推荐(0)

Java不写文件,LOAD DATA LOCAL INFILE大批量导入数据到MySQL的实现(转)

摘要: MySQL使用load data local infile 从文件中导入数据比insert语句要快,MySQL文档上说要快20倍左右。但是这个方法有个缺点,就是导入数据之前,必须要有文件,也就是说从文件中导入。这样就需要去写文件,以及文件删除等维护。某些情况下,比如数据源并发的话,还会出现写文件并发 阅读全文

posted @ 2017-01-19 16:48 dongruiha 阅读(2789) 评论(0) 推荐(0)

发送验证码后倒计时功能实现

摘要: <button class="btn_yan" onclick="settime(this); return false;">获取验证码</button> <script> var countdown = 60; </script> 阅读全文

posted @ 2017-01-19 09:57 dongruiha 阅读(367) 评论(0) 推荐(0)

2017年1月12日

laravel5.1框架model类查询实现

摘要: laravel框架model类查询实现: User::where(['uid'=8])->get(); User类继承自Model类:Illuminate\Database\Eloquent\Model 当User类静态调用where方法时,自动调用了Model里的魔术方法: 相当于调用了user对 阅读全文

posted @ 2017-01-12 09:21 dongruiha 阅读(4674) 评论(0) 推荐(0)

2017年1月9日

HTTP请求重复发送

摘要: 帖子地址 http://bbs.csdn.net/topics/390831787 解决方案:1. java -Dsun.net.http.retryPost=false 2. 换用apche httpClient 4.0+ 阅读全文

posted @ 2017-01-09 17:30 dongruiha 阅读(2239) 评论(0) 推荐(0)

HttpURLConnection学习

摘要: 转自:http://mobile.51cto.com/abased-448264.htm 最常用的Http请求无非是get和post,get请求可以获取静态页面,也可以把参数放在URL字串后面,传递给servlet,post与get的不同之处在于post的参数不是放在URL字串里面,而是放在http 阅读全文

posted @ 2017-01-09 14:26 dongruiha 阅读(447) 评论(0) 推荐(0)

导航