質問編集履歴
1
タグとコードの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,4 +11,17 @@
|
|
11
11
|
/storage/logs/articles/のディレクトリは存在しています。
|
12
12
|
なぜファイルが作成できないのでしょうか?
|
13
13
|
どこが間違っているのか教えていただきたいです。
|
14
|
-
よろしくお願いします。
|
14
|
+
よろしくお願いします。
|
15
|
+
|
16
|
+
//////追記//////
|
17
|
+
|
18
|
+
```php
|
19
|
+
$path='/storage/logs/articles/';
|
20
|
+
$file=$path.$id.'.log';
|
21
|
+
|
22
|
+
if(file_exists($path) and is_dir($path)){
|
23
|
+
if(!file_exists($file)){
|
24
|
+
touch($file);
|
25
|
+
}
|
26
|
+
}
|
27
|
+
```
|