微擎模板路由

2019-04-24  本文已影响0人  StevenQin

MVC 模式
http://mall.raycare.net/app/index.php?i=5&c=entry&do=index&m=health_moniter

public function doMobileIndex() {
        //这个操作被定义用来呈现 功能封面
        global $_W,$_GPC;
        include $this->template('index');
        echo IA_ROOT."<br/>";
        echo MODULE_URL."<br/>";
        echo $_GPC['m']."<br/>";
        //网站的域名
        echo $_W['siteroot']."<br/>";
//        var_dump($_W);
    }
//data/config.php
$config['setting']['development']=1;

*创建 url路由
https://s.w7.cc/index.php?c=wiki&do=view&id=1&list=162

常用路由创建

  //创建前台路由
        echo $this->createMobileUrl('index')."<br/>";
        //创建后台路由
        echo $this->createWebUrl('guanli')."<br/>";
./index.php?i=5&c=entry&do=index&m=health_moniter
./index.php?c=site&a=entry&do=guanli&m=health_moniter
上一篇 下一篇

猜你喜欢

热点阅读