回答編集履歴
2
修正
test
CHANGED
@@ -32,6 +32,12 @@
|
|
32
32
|
|
33
33
|
$file = 'test.txt';
|
34
34
|
|
35
|
+
// 一体どこのファイルを見ているのかを確認
|
36
|
+
|
37
|
+
var_dump(realpath($file));
|
38
|
+
|
39
|
+
|
40
|
+
|
35
41
|
$current = file_get_contents($file);
|
36
42
|
|
37
43
|
$current .= "John Smith\n";
|
1
追記
test
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
if (!is_writable($file)) {
|
42
42
|
|
43
|
-
throw new Exception(sprintf('%s は書き込み権限がありません。'));
|
43
|
+
throw new Exception(sprintf('%s は書き込み権限がありません。', $file));
|
44
44
|
|
45
45
|
}
|
46
46
|
|