codeigniter - PHP code to create folder -


my project needs folder created whenever user registers using userid inside upload folder i'm using below lines not creating new folder inside upload folder userid

       $userid = $this->db->insert_id();        $path   = './upload/'.$userid;        if(!is_dir($path)) //create folder if it's not exists        {           mkdir($path,0755,true);        }  

ps: using wamp server , ci..

thanks

you should try code

chmod('./upload/', 0777); $path   = './upload/'.$userid; if (!is_dir($path)) { //create folder if it's not exists     mkdir($path, 0755, true); } 

upload dir path ci

enter image description here


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -