支付宝赞助帐号:service@kuitao8.com 

php批量生成方法

Created2019-06-25   Views 734    Author 懒人程序
 <?php
$menu =
                array (
                    0 =>
                        array (
                            'url' => '/admin/index/index.html',
                            'id' => 'index',
                            'title' => '管理首页',
                        ),
                    1 =>
                        array (
                            'url' => '/admin/index/not_admin.html',
                            'id' => 'not_admin',
                            'title' => '管理账户',
                        ),
                    2 =>
                        array (
                            'url' => '/admin/index/not_order.html',
                            'id' => 'not_order',
                            'title' => '订单列表',
                        ),
                    3 =>
                        array (
                            'url' => '/admin/index/not_orderadd.html',
                            'id' => 'not_orderadd',
                            'title' => '订单添加',
                        ),
                    4 =>
                        array (
                            'url' => '/admin/index/not_danhao.html',
                            'id' => 'not_danhao',
                            'title' => '批量单号',
                        ),
                    5 =>
                        array (
                            'url' => '/admin/index/not_orderxlsup.html',
                            'id' => 'not_orderxlsup',
                            'title' => '上传单号',
                        ),
                    6 =>
                        array (
                            'url' => '/admin/index/not_tongji.html',
                            'id' => 'not_tongji',
                            'title' => '销售统计',
                        ),
                    7 =>
                        array (
                            'url' => '/admin/index/not_fenxi.html',
                            'id' => 'not_fenxi',
                            'title' => '订单分析',
                        ),
                    8 =>
                        array (
                            'url' => '/admin/index/not_chanpin.html',
                            'id' => 'not_chanpin',
                            'title' => '产品管理',
                        ),
                    9 =>
                        array (
                            'url' => '/admin/index/not_pingjia.html',
                            'id' => 'not_pingjia',
                            'title' => '评价管理',
                        ),
                    10 =>
                        array (
                            'url' => '/admin/index/not_mail.html',
                            'id' => 'not_mail',
                            'title' => '邮箱设置',
                        ),
                    11 =>
                        array (
                            'url' => '/admin/index/not_set.html',
                            'id' => 'not_set',
                            'title' => '网站设置',
                        ),
                    12 =>
                        array (
                            'url' => '/admin/index/seting_sms.html',
                            'id' => 'seting_sms',
                            'title' => '短信接口',
                        ),
                    13 =>
                        array (
                            'url' => '/admin/index/not_log.html',
                            'id' => 'not_log',
                            'title' => '操作日志',
                        ),
                    14 =>
                        array (
                            'url' => '/admin/index/not_logout.html',
                            'id' => 'not_logout',
                            'title' => '退出登录',
                        ),
                );
   $str = "";
        foreach ($menu as $key=>$value) {
            $str .= '   public function '.$value['id'].'()'."\r\n";
            $str .= "   {\r\n";
            $str .= '         return $this->view->fetch();'."\r\n";
            $str .= "    }\r\n";
        }
        echo $str;exit;
上一篇: phpexcel生成复杂的表头
下一篇:没有了
支持键盘 ← →

邮件订阅

订阅我们的精彩内容