質問編集履歴

1

エラー追加

2016/10/12 07:01

投稿

nagi
nagi

スコア66

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,10 @@
1
- file_get_contentsでパスが存在しなかった場合、PHPエラーが出てしまうので、
1
+ file_get_contentsでファイルを取得することは出来るのですが、パスが存在しなかった場合、PHPエラーが出てしまうので、例外処理で対応したいです。
2
2
 
3
+
4
+
3
- 例外処理で対応したいです。
5
+ ErrorException in ContactController.php line 65:
6
+
7
+ file_get_contents(/home/$uuid/result.json): failed to open stream: No such file or directory
4
8
 
5
9
 
6
10
 
@@ -10,7 +14,7 @@
10
14
 
11
15
  ```lang-php
12
16
 
13
- $path = "/home//$uuid/result.json";
17
+ $path = "/home/$uuid/result.json";
14
18
 
15
19
 
16
20