- 博客(14)
- 资源 (1)
- 收藏
- 关注
原创 php父类调用子类方法
class a{ public function geta() { $str = $this->getstr($msg); return "class a and ".$msg; } public function getstr(&$msg){}}class b extends a{ public function
2016-08-19 16:39:39 3399
原创 try-catch
<?php//test try catch//先是throw new Exception//后是try 执行程序 catche 捕捉 throw//最后$e->getMessage 输出throw的内容function getNum($num){ if($num<5) { throw new Exception('num is less than 5'
2016-08-17 11:30:43 383
原创 PHP队列实现
PHP模拟队列操作,代码如下<?php/** * php队列测试 * @author lee.chuke@gmail.com * @date 2014-12-02*/class Queue{ private $_data = array(); private $_top = null; private $_end = 0; public fu
2014-12-02 14:40:31 517
原创 PHP函数的无限递归实现
需求:从一个数组里面找到想要的数据并打印出来。$count = 8;for($i=0;$i<=$count;$i++){ $arr[] = $i;}function getList($arr){ $k = 0; if($arr[$k]!=5){ echo $arr[$k]; unset($arr[$k]); $temp_arr = array_values($arr)
2014-12-02 14:26:56 635
原创 Mongo connecting error Failed to connect to: *.*.201.18:27018: Remote server has closed the conne
服务使用redis+mongo集群,因为mongo集群机器
2014-06-27 11:42:30 3165
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人