摘要: 按照官方文档进行认证 发现不管怎么样都是失败if (Auth::attempt(array('email' => $email, 'password' => $password), true)){ // 用户状态永久保存...}研究他的源代码 Auth定义在vendor/laravel/framework/src/Illuminate/Auth attempt方法在Guard.php 这个方法最关键的就是$this->lastAttempted = $user = $this->provider->retrieveByCredent 阅读全文
posted @ 2014-02-28 00:38 heyli 阅读(8595) 评论(1) 推荐(1) 编辑
摘要: linux下安装了mysql,不能从其它机器访问 帐号已经授权从任意主机进行访问vi /etc/sysconfig/iptables在后面添加-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPTservice iptables restart发现还是不行最终发现记录要添加在-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT 这一条前面 再次重启 OK 阅读全文
posted @ 2012-07-14 10:38 heyli 阅读(460) 评论(0) 推荐(0) 编辑
摘要: 其实跟普通的同步一样,假设有三台数据库服务器 A B C 环形同步就是 B从A同步 C从B同步 A从C同步 这样的好处就是每一台都可以写 记得为my.cnf加上log-slave-updates 选项 这样从服务器读的数据才会更新bin日志 阅读全文
posted @ 2012-06-12 21:42 heyli 阅读(1290) 评论(0) 推荐(0) 编辑
摘要: function main(){ recur(1);}function recur($n){ echo "Level: ".$n.'<br>'; if($n<4) recur($n+1); echo "Level2: ".$n.'<br>'; }main();最终的结果是:Level: 1Level: 2Level: 3Level: 4Level2: 4Level2: 3Level2: 2Level2: 1应该有一部分人猜错了 认为到Level2: 4就应该结束 直接把控制权直接返回给main 阅读全文
posted @ 2011-12-12 16:25 heyli 阅读(369) 评论(2) 推荐(1) 编辑
摘要: LoadModule php5_module D:/php/php5apache2_2.dll 加了之后apache不能启动 网上一搜 所有的文章都是一样 无任何价值自己cmd 命令行下运行 httpd 提示[Sat Nov 19 13:36:18 2011] [crit] Apache is running a threaded MPM, but your PHModule is not compiled to be threadsafe. You need to recompile PHP.Pre-configuration failed大概意思就是 apache是线程安全的 而我的php 阅读全文
posted @ 2011-11-19 14:07 heyli 阅读(2713) 评论(0) 推荐(0) 编辑