摘要: 1.去重 <?php $a=array("a"=>"Cat","b"=>"Dog","c"=>"Cat"); print_r(array_unique($a)); ?> Array ( [a] => Cat [b] => Dog ) 2.键值交换 array_flip(); $arr1 = arra 阅读全文
posted @ 2016-07-15 19:08 Docter 阅读(148) 评论(0) 推荐(0)
摘要: 接口是一个特殊的抽象类,抽象类是一个特殊的类。 抽象类中有抽象方法和实例化的方法: 1.全部实例化的是普通类 2.部分实例化的是抽象类 3.全部是抽象的是接口 阅读全文
posted @ 2016-07-13 15:57 Docter 阅读(141) 评论(1) 推荐(0)
摘要: PHP之道 laravist Sublime Text 3 阅读全文
posted @ 2016-07-13 13:53 Docter 阅读(101) 评论(0) 推荐(0)
摘要: 字符串三种定义方式: 1.双引号定义: 当双引号中包含变量时,变量会与双引号中的内容连接在一起;<双引号当成变量> $str="string"; echo “$str”; //string; 2.单引号定义: 当单引号中包含变量时,变量会被当做字符串输出。 echo '$str' //$str 3. 阅读全文
posted @ 2016-07-08 11:19 Docter 阅读(110) 评论(0) 推荐(0)
摘要: 1.创建存储过程: create procedure show(in id int) begin select * from sc where xuehao=id; end 2.使用存储过程: call show(10) 3.复杂操作: drop procedure show; //删除存储过程; 阅读全文
posted @ 2016-07-07 20:27 Docter 阅读(109) 评论(0) 推荐(0)
摘要: http://blog.163.com/jackylau_v/blog/static/175754040201101175828355/(discuz安装教程) 阅读全文
posted @ 2016-07-03 21:38 Docter 阅读(147) 评论(2) 推荐(0)
摘要: PHP: 数组转字符串:explode() $str = "Hello world. It's a beautiful day."; print_r (explode(" ",$str)); ?> 结果: Array( [0] => Hello [1] => world. [2] => It's [ 阅读全文
posted @ 2016-06-15 16:57 Docter 阅读(355) 评论(0) 推荐(0)
摘要: 1.使用header()函数的重定向方式实现网页跳转。 EXE:header("Location: http://www.example.com/"); 2.URL的GET请求中附带参数 EXE: http://www.examble.com?id=1 3.隐藏表单存储资料,通过表单POST,GET 阅读全文
posted @ 2016-06-14 13:03 Docter 阅读(1150) 评论(0) 推荐(0)
摘要: 这周学习了PHP与MySQL的搭接下面来给大家分享一下: 1.账号注册,论坛发帖... 思路:通过form表单提交到PHP页面,PHP页面往MySQL中插入数据; 2.账号登陆 思路:form提交数据到PHP,PHP通过提交的数据作为MySQL的查询条件,如果条数大于一则echo:登陆成功。 3.贴 阅读全文
posted @ 2016-05-21 08:26 Docter 阅读(178) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-05-19 11:11 Docter 阅读(8) 评论(0) 推荐(0)