- /**
- *
- +--------------------------------------------------------------------
- * Description 递归创建目录
- +--------------------------------------------------------------------
- * @param string $dir 需要创新的目录
- +--------------------------------------------------------------------
- * @return 若目录存在,或创建成功则返回为TRUE
- +--------------------------------------------------------------------
- * @author gongwen
- +--------------------------------------------------------------------
- */
- function mkdirs($dir, $mode = 0777){
- if (is_dir($dir) || mkdir($dir, $mode)) return TRUE;
- if (!mkdirs(dirname($dir), $mode)) return FALSE;
- return mkdir($dir, $mode);
- }
复制代码
|