$url = $this->film_model . $user['shop_id'] . "/code_img/";
         //判断是否存在
    if(!$this->isDirFile($url)){
           mkdir ($url,0777,true);
    }



        //判断文件或者目录是否存在
    protected function isDirFile($path,$isfile = false){
        if($isfile){
            return file_exists($path) ? true : false;
        }else{
            return is_dir($path) ? true : false;
        }
    }

 

相关文章: