teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

環境を追加

2017/06/29 11:43

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  言語はPHPです。
6
6
 
7
+ PHP5.4、windows10です。
8
+
7
9
  実行結果が異なっているので、その画像を用意しました。
8
10
 
9
11
  ローカルでの実行結果(正しい結果)
@@ -50,7 +52,7 @@
50
52
  }
51
53
 
52
54
  // apiのリクエストURL
53
- $url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=".$post[0].'|'.$destination."&destinations=".$destination."&mode='".$mode."'&language=ja&key=AIzaSyDkfD-tWBHiWj80F5NdhNl4wMj8rV3WTlg";
55
+ $url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=".$post[0].'|'.$destination."&destinations=".$destination."&mode='".$mode."'&language=ja&key=AIzaSyDkfDsdgdhfjgkhNl4wMj8rV3WTlg";
54
56
  // jsonデータを文字列として読み込む
55
57
  $json = file_get_contents($url);
56
58
  // 文字化け対策

1

正しい実行結果の記載追加

2017/06/29 11:43

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  実行結果が異なっているので、その画像を用意しました。
8
8
 
9
- ローカルでの実行結果
9
+ ローカルでの実行結果(正しい結果)
10
10
  ![イメージ説明](1a463534a425c5b6c06f1b4cdc979603.png)
11
11
 
12
12
  レンタルサーバでの実行結果