mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 11:32:48 +08:00
优化path工具类
This commit is contained in:
@@ -38,9 +38,13 @@ class PathTools
|
|||||||
return self::intiDir($runtime_path);
|
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);
|
$dir_name = dirname($file_path);
|
||||||
|
} else {
|
||||||
|
$dir_name = $file_path;
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_dir($dir_name)) {
|
if (!is_dir($dir_name)) {
|
||||||
mkdir($dir_name, 0777, true);
|
mkdir($dir_name, 0777, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user