php 创建文件夹

/**
 * 创建存放文件夹
* $path 文件路径
*/ public static function makeDirectory($path) {
   // iconv 创建中文目录
$dir = iconv("UTF-8", "GBK", $path); if (!file_exists($dir)){
      // 路径 权限 是否创建多级目录,默认为false
return mkdir($dir,0777,true); } else { return file_exists($dir); } }

 

posted @ 2021-02-07 11:17  老阴比  阅读(254)  评论(0)    收藏  举报