first commit
This commit is contained in:
7
Web/imasBackend/weatherInfo.php
Normal file
7
Web/imasBackend/weatherInfo.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
header("Access-Control-Allow-Origin: *"); // 允许所有域名访问
|
||||
header("Access-Control-Allow-Methods: GET, POST, OPTIONS"); // 允许的请求方法
|
||||
header("Access-Control-Allow-Headers: Content-Type"); // 允许的请求头
|
||||
header("Content-type:application/json");
|
||||
$weather = json_decode(file_get_contents('https://restapi.amap.com/v3/weather/weatherInfo?key=12085a54026b8e80ed3f69ec9c328e3e&city=510115&extensions=base&output=JSON'));
|
||||
echo json_encode($weather);
|
Reference in New Issue
Block a user