Files
littleTiger/application/route.php

28 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2019-02-28 19:48:21 +08:00
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
//
//return [
// '__pattern__' => [
// 'name' => '\w+',
// ],
// '[hello]' => [
// ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
// ':name' => ['index/hello', ['method' => 'post']],
// ],
// //'goodsInfo/[:id]' => ['Home/Goods/goodsInfo',['method' => 'get', 'ext' => 'html'],'cache'=>3600]
// //Home/Goods/goodsInfo/id/104.html
//];
//use think\Route;
// 注册路由到index模块的News控制器的read操作
//Route::get('goodsInfo/:id','home/goods/goodsInfo',['cache'=>['Home/Goods/goodsInfo',300]]);// 访问方式 http://www.tpshop2.0.com/goodsInfo/77.html
// http://www.tpshop2.0.com/home/goods/goodsInfo/id/77.html