从路由文件 include 'cong.php'; include 'hui.php';
app.php主路由文件
cong.php
<?php
use think\facade\Route;
//聪哥
Route::get('cong/think', function () {
return 'cong';
});
Route::group( function () {
//路由
})->allowCrossDomain([
'Access-Control-Allow-Origin' => '*',
'Access-Control-Allow-Headers' =>'Origin, Content-Type, Cookie, X-CSRF-TOKEN, Accept, Authorization, X-XSRF-TOKEN',
'Access-Control-Allow-Methods' =>'GET, POST, PUT, DELETE',
'Access-Control-Allow-Credentials' => 'true'
])->middleware(\app\admin\middleware\commons::class);
版权声明:本文为qq_34631220原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。