//$arr 数组 //$pid 默认值 private function get_attr($arr,$pid='0'){ $tree = array(); //每次都声明一个新数组用来放子元素 foreach($arr as $v){ if($v['pid'] == $pid){ //匹配子记录 $v['children'] = $this->get_attr($arr,$v['id']); //递归获取子记录 ?
增加体验效果请勿用IE、 本站对IE不友好、 o(∩_∩)o 哈哈
增加体验效果请勿用IE、 本站对IE不友好、 o(∩_∩)o 哈哈
#80配置如下 server { listen 80; server_name ceshi.jifengyinyue.com; root "C:/Users/Administrator/Desktop/testmonsoont/public"; location / { index index.php index.html error/index.html; if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } error_page 400 /error/400.html; error_page 403 /error/403.html; error_page 404 /error/404.html;