Loading

08 2017 档案

摘要:序列化与反序列化 把复杂的数据类型压缩到一个字符串中 serialize() 把变量和它们的值编码成文本形式unserialize() 恢复原先变量 1.创建一个$arr数组用于储存用户基本信息,并在浏览器中输出查看结果; ? 1 2 3 4 5 6 7 $arr=array(); $arr['na 阅读全文
posted @ 2017-08-24 18:18 路闻man 阅读(125) 评论(0) 推荐(0)
摘要:一、定义函数 二、正则 阅读全文
posted @ 2017-08-17 17:48 路闻man 阅读(4784) 评论(0) 推荐(0)
摘要:ThinkPHP中关联查询(即多表联合查询)可以使用 table() 方法或和join方法,具体使用如下例所示: 1、原生查询示例: 代码如下: $Model = new Model(); $sql = 'select a.id,a.title,b.content from think_test1 as a, think_test2 as b where a.id=b.id '.$map.'... 阅读全文
posted @ 2017-08-09 11:38 路闻man 阅读(246) 评论(0) 推荐(0)
摘要:function remove_duplicate($array){ $result=array(); foreach ($array as $key => $value) { $has = false; foreach($result as $val){ if($val['id']==$value 阅读全文
posted @ 2017-08-09 11:37 路闻man 阅读(105) 评论(0) 推荐(0)