// 允许全局跨域
header('Access-Control-Allow-Origin: *');
header('Access-Control-Max-Age: 1800');
header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, OPTIONS, DELETE');
header('Access-Control-Allow-Headers: *');
if (strtoupper($_SERVER['REQUEST_METHOD']) == "OPTIONS") {
http_response_code(204);
exit;
}