ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
一、在Think[php](https://www.oschina.net/p/php)5入口文件public/index.[php](https://www.oschina.net/p/php),添加如下代码即可解决。 header("Access-Control-Allow-Origin:\*"); header("Access-Control-Allow-Methods:GET, POST, OPTIONS, DELETE"); header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, Accept-Language, Origin, Accept-Encoding"); 二、index.[php](https://www.oschina.net/p/php)中的实际代码: ![](https://oscimg.oschina.net/oscnet/up-ab3d0a0b574119f184e416c1be130939c7c.png)