![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php
china165
这个作者很懒,什么都没留下…
展开
-
PHP无限级分类
function generateTree($items){ $tree = array(); foreach($items as $item){ if(isset($items[$item['pid']])){ $items[$item['pid']]['son'][] = &$items[$item['id']]; }el转载 2014-11-18 21:54:56 · 387 阅读 · 0 评论 -
php三联级城市列表
http://www.1024i.com/product/8.html原创 2014-12-12 16:18:27 · 1090 阅读 · 0 评论 -
thinkphp 缩略图上传
//公共上传 private function _upload($width, $height, $path, $prefix) { import('ORG.Net.UploadFile'); $upload = new UploadFile(); // 实例化上传类 $upload->maxSize = C('UPLOAD_SIZE');转载 2014-12-11 12:47:27 · 429 阅读 · 0 评论 -
curl不使用文件存取cookie php使用curl获取cookie示例
/*-----保存COOKIE-----*/ $url = 'www.xxx.com'; //url地址 $post = "id=user&pwd=123456"; //POST数据 $ch = curl_init($url); //初始化 curl_setopt($ch,CURLOPT_HEADER,1); //将头文件的信息作为数据流输出 curl_setopt($ch,CURLOPT_RET转载 2014-11-27 20:43:27 · 755 阅读 · 0 评论 -
easyui datagrid 批量编辑和提交
$(function() { var $dg = $("#dg"); $dg.datagrid({ url : "servlet/list", width : 700, height : 250, columns : [ [ { field : 'code', title : 'Code', width : 100, editor :转载 2014-11-20 14:09:59 · 645 阅读 · 0 评论 -
树目录
protected function tree(&$list,$pid=0,$level=0,$html='--'){ static $tree = array(); foreach($list as $v){ if($v['pid'] == $pid){ //$v['sort'] = $level; //$v['html'] = str_repe转载 2014-11-18 21:44:20 · 317 阅读 · 0 评论 -
php之无限极分类
http://blog.csdn.net/kankan231/article/details/8462349转载 2014-11-18 21:51:22 · 287 阅读 · 0 评论 -
tree
function tree($arr, $pid, $tmp){ $tmp=$tmp." "; for($i=0; $i<count($arr); $i++){ if($arr[$i]["pid"]==$pid){ echo $tmp."|--".$arr[$i]["name"].""; tree($arr, $arr[$i]["id"], $tmp); } } }转载 2014-11-19 13:05:04 · 296 阅读 · 0 评论 -
thinkphp 合并两个字段组合成一个临时字段concat函数
$list=$menu->field("id,name,pid,path,concat(path,'-',id) as bpath")->order('bpath')->select(); thinkphp 合并两个字段组合成一个临时字段concat函数转载 2015-01-04 10:15:08 · 1079 阅读 · 0 评论