|
@@ -14,7 +14,12 @@ namespace think;
|
|
|
if (version_compare(PHP_VERSION, '7.1.0', '<'))
|
|
|
die('require PHP > 7.1.0 !');
|
|
|
|
|
|
-
|
|
|
+// 检测PHP环境 允许前端跨域请求
|
|
|
+header("Access-Control-Allow-Origin:*");
|
|
|
+// 响应类型
|
|
|
+header('Access-Control-Allow-Methods:GET, POST, PUT, DELETE');
|
|
|
+// 响应头设置
|
|
|
+header('Access-Control-Allow-Headers:x-requested-with, content-type');
|
|
|
|
|
|
|
|
|
if (! file_exists('./install.lock')) {
|