企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
​ 在入口文件里面加上下面这段代码就ok了 点击链接加入群聊【ThinkPHP56小功能】:[正在跳转](https://jq.qq.com/?_wv=1027&k=Z0c641WP "正在跳转")  ``` ​// [ 应用入口文件 ] if(isset($_SERVER["HTTP_ORIGIN"])) { header('Access-Control-Allow-Origin:'.$_SERVER["HTTP_ORIGIN"]); } header("Access-Control-Allow-Credentials: true"); header("Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With,Access-Token"); header("Access-Control-Allow-Methods: GET,POST,INPUT,OPTION"); if (strtoupper($_SERVER['REQUEST_METHOD']) == 'OPTIONS') { header('Access-Control-Allow-Origin:'.$_SERVER["HTTP_ORIGIN"]); header("Access-Control-Allow-Credentials: true"); header("Access-Control-Allow-Headers: Content-Type,access_token,Keep-Alive,X-Requested-With"); header("Access-Control-Allow-Methods: GET,POST,INPUT,OPTION"); http_response_code(200); exit; } ```