thinkphp6 多级控制器报错

开启了多级控制器

不使用路由,按照.语法书写url。以下这样书写地址就是正常的

http://serverName/index.php/user.blog/index

但是,使用路由的时候报错

Route::get('user/blog','user.blog/index');
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
阅读 1.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进