diff --git a/src/JSONDB.php b/src/JSONDB.php index ab6911e..8787389 100644 --- a/src/JSONDB.php +++ b/src/JSONDB.php @@ -68,6 +68,10 @@ private function check_file() * @return bool */ + // Checks if DIR exists, if not create + if (! is_dir($this->dir)) { + mkdir($this->dir, 0700); + } // Checks if JSON file exists, if not create if (! file_exists($this->file)) { touch($this->file);