vue session跨域 PHP tp5

第一步:vue項目request.js 加 // ajax請求默認帶上cookie axios.defaults.withCredentials=true; 第二步:後臺接口處理: public/index.php加: // 支持事先使用靜態方法設置Request對象和Config對象 header('Access-Control-Allow-Origin:*'); header('Access-
相關文章
相關標籤/搜索