質問編集履歴

1

コードを訂正しました

2020/07/15 11:53

投稿

-___-
-___-

スコア3

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  ```
14
14
 
15
- file_get_contents(https://rakutenx.com): failed to open stream: No route to host in /file/Main.php on line 100
15
+ file_get_contents(https://xxxxxxxxxxxxxxx.com): failed to open stream: No route to host in /file/Main.php on line 100
16
16
 
17
17
  ```
18
18
 
@@ -26,11 +26,9 @@
26
26
 
27
27
  <?php
28
28
 
29
- $url = "https://rakutenx.com";
29
+ $url = "https://xxxxxxxxxxxxxxx.com";
30
30
 
31
- $context = stream_context_create($contextOptions);
32
-
33
- $ret = file_get_contents($url, false, $context);
31
+ $ret = file_get_contents($url);
34
32
 
35
33
  if(!$ret){
36
34
 
@@ -41,8 +39,6 @@
41
39
  echo 'OK';
42
40
 
43
41
  }
44
-
45
-
46
42
 
47
43
  ```
48
44
 
@@ -56,7 +52,7 @@
56
52
 
57
53
  <?php
58
54
 
59
- $url = "https://rakutenx.com";
55
+ $url = "https://xxxxxxxxxxxxxxx.com";
60
56
 
61
57
  $contextOptions = array(
62
58