| @@ -52,16 +52,14 @@ | ||
| 52 | 52 | $pathArr = explode('/', $path); // like "fieldname/user => [Fieldname, user] |
| 53 | 53 | foreach ($pathArr as $d) { |
| 54 | 54 | $rootDir .= $d . DIRECTORY_SEPARATOR; |
| 55 | 55 | if (!realpath($rootDir)) { |
| 56 | - wp_mkdir_p($rootDir); | |
| 56 | + mkdir($rootDir); | |
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | $fullPath = $rootDir . $fileName; |
| 60 | - if ('a' === $fileOpenMode) { | |
| 61 | - FileHandler::appendFile($fullPath, $log); | |
| 62 | - } else { | |
| 63 | - FileHandler::writeFile($fullPath, $log); | |
| 64 | - } | |
| 60 | + $file = fopen($fullPath, $fileOpenMode); | |
| 61 | + fwrite($file, $log); | |
| 62 | + fclose($file); | |
| 65 | 63 | return true; |
| 66 | 64 | } |
| 67 | 65 | } |