mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-10 11:52:49 +08:00
优化path工具类
This commit is contained in:
@@ -38,9 +38,13 @@ class PathTools
|
||||
return self::intiDir($runtime_path);
|
||||
}
|
||||
|
||||
public static function intiDir($file_path)
|
||||
public static function intiDir($file_path, $is_dirname = false)
|
||||
{
|
||||
if (!$is_dirname) {
|
||||
$dir_name = dirname($file_path);
|
||||
} else {
|
||||
$dir_name = $file_path;
|
||||
}
|
||||
|
||||
if (!is_dir($dir_name)) {
|
||||
mkdir($dir_name, 0777, true);
|
||||
|
||||
Reference in New Issue
Block a user