route.php
838 字节
<?php
use think\Route;
// +----------------------------------------------------------------------
// | 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>
// +----------------------------------------------------------------------
/**
* 图片路由
*/
Route::get('image/:sha1', 'files/image/index', [], ['w' => '\d+', 'h' => '\d+', 'type' => '\d+']);
/**
* 文件路由
*/
Route::get('file/:sha1', 'files/file/index');