时间:2021-07-01 10:21:17 帮助过:6人阅读
http://api.map.baidu.com/direction/v1?mode=driving&origin=永兴村&destination=清华大学&origin_region=舟山&destination_region=北京&output=json&ak=gfPnxaaiPyNIhM7c3eZ1kmEL得到的json数据被json_decode之后就变成了这样Array ( [status] => 2 [message] => Parameter Invalid [info] => Array ( [copyright] => Array ( [text] => @2014 Baidu - Data [imageUrl] => http://api.map.baidu.com/images/copyright_logo.png ) ) [result] => Array ( ) ) ,数据都去哪里了啊
直接浏览器访问 http://api.map.baidu.com/direction/v1?mode=driving&origin=永兴村&destination=清华大学&origin_region
=舟山&destination_region=北京&output=json&ak=gfPnxaaiPyNIhM7c3eZ1kmEL
得到
{ "status":2, "message":"Parameter Invalid", "info":{ "copyright":{[ "text":"@2014 Baidu - Data", "imageUrl":"http://api.map.baidu.com/images/copyright_logo.png" } }, "result":[ ]}其中 "message":" Parameter Invalid"