/**
* @Author: 小破孩嫩
* @Email: 3584685883@qq.com
* @Time: 2021/4/12 13:36
* @param $path
* @Description:设置路径判断是否存在,不存在创建
*/
public function createPath($path){
$Month = date('Ym',time());
$Day = date('d',time());
$path = $this->path.$Month.'/'.$Day.'/';
if(!is_dir($path)){
header("Content-type:text/html;charset=utf-8");
$res = mkdir(iconv("UTF-8", "GBK", $path),0777,true);
if(!$res){
$this->createPath();
}
}
return $path;
}
1 条评论
感谢分享 赞一个