初始化
This commit is contained in:
21
route/app.php
Normal file
21
route/app.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
use think\facade\Route;
|
||||
|
||||
|
||||
Route::rule(':func','test/:func')->pattern([
|
||||
'func'=>'[a-zA-Z0-9\_\-]{1,50}'
|
||||
])
|
||||
->ext('test');
|
||||
|
||||
Route::miss(function(){
|
||||
return '404';
|
||||
});
|
||||
Reference in New Issue
Block a user