- 博客(2)
- 收藏
- 关注
原创 thinkphp5.1抽离出server逻辑层
(目前只找到这样一个方法,有更方便简单的可以留言)1.在application中创建common目录, 以及创建service目录。 也就是application/common/service2.(选) 在controller文件目录新建Base文件,加载所有service以下为代码:class Base extends Controller{ /**...
2019-06-10 10:36:22 2436 2
原创 thinkphp5.1 中间价+跨域处理 options出错解决
role代码Route::group([], function () { Route::get('admin/xxxx', 'xxxx/xxxx/xxxx')->allowCrossDomain();})->middleware('Check');中间件代码:header('Access-Control-Allow-Origin: *');header('A...
2019-06-10 10:28:52 1208
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人