摘要: strip_tags — 从字符串中去除 HTML 和 PHP 标记 string strip_tags ( string $str [, string $allowable_tags ] ) //去除用户输入多余空格$verify=trim($verify); //得到指定字符的ascii int 阅读全文
posted @ 2017-05-04 17:02 皇家玄学团 阅读(135) 评论(0) 推荐(0) 编辑
摘要: /*$pattern 正则表达式$subject匹配的目标数据preg_match &一维数组 匹配第一个结果次数preg_match_all &二维数组 返回所有匹配的结果次数*/$pattern='/[0-9]/';$subjiec='wsdf23j3g4g432jg';$m1=$m2=arra 阅读全文
posted @ 2017-05-04 16:46 皇家玄学团 阅读(417) 评论(0) 推荐(0) 编辑
摘要: class Single{ //$ins静态属性,用来存放实例对象 static public $ins=''; protected $hash; //1.final 构造方法,防止子类覆盖方法。2.保护私有方法,无法类外实例化。 final protected function __constru 阅读全文
posted @ 2017-05-04 16:20 皇家玄学团 阅读(95) 评论(0) 推荐(0) 编辑
摘要: class DbMysqlManage{ public $message; //操作提示信息 public $conn; //link资源 public function getMessage($mes,$flag=FALSE){ if($flag){ $this->message.="<div s 阅读全文
posted @ 2017-05-04 15:49 皇家玄学团 阅读(207) 评论(0) 推荐(0) 编辑
摘要: //recursion 递归function test($i){ echo $i,'<br/>'; //3 --$i; if($i>=0){ test($i); //test(2) /* echo $i,'<br/>'; //2 --$i; if($i>=0){ test($i); //test(1 阅读全文
posted @ 2017-05-04 10:13 皇家玄学团 阅读(103) 评论(0) 推荐(0) 编辑
摘要: //匿名函数,也叫闭包函数,允许临时创建一个没有指定名称的函数,最经常用做回调函数参数的值//匿名函数也可以作为变量的值来使用$func =function(){ return 'this is a test';};echo $func().'<br/>';$func =function($user 阅读全文
posted @ 2017-05-04 10:12 皇家玄学团 阅读(102) 评论(0) 推荐(0) 编辑
摘要: //自定义函数function study($username){ echo $username. ' is study...<br/>';}function play($username){ echo $username .' is playing...<br/>';}//自定义调用functio 阅读全文
posted @ 2017-05-04 10:10 皇家玄学团 阅读(2087) 评论(0) 推荐(0) 编辑
摘要: Mysql基础 Linux NoSql 开发环境 1:PHP7中的新特性与废弃的特性 2:为什么要使用PHP7,PHP7快在哪里 版本控制 1:git的使用命令,例如:写出版本回退命令。 2:git与svn的区别。 3:如何进行多分支开发,包括多人开发协同,分段测试,上线。 开发环境 版本控制 下面 阅读全文
posted @ 2017-05-04 09:58 皇家玄学团 阅读(242) 评论(0) 推荐(0) 编辑