微擎模板路由

  • 前端app目录渲染模板

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."
"; echo MODULE_URL."
"; echo $_GPC['m']."
"; //网站的域名 echo $_W['siteroot']."
"; // var_dump($_W); }
  • 后台 web目录渲染模板
  • 原始链接
    http://mall.raycare.net/web/index.php?c=site&a=entry&eid=104&version_id=0
  • MVC模式
  • 开启开发者模式
//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')."
"; //创建后台路由 echo $this->createWebUrl('guanli')."
";
./index.php?i=5&c=entry&do=index&m=health_moniter
./index.php?c=site&a=entry&do=guanli&m=health_moniter

你可能感兴趣的:(微擎模板路由)