I am using codeigniter version 2.1.4
for my website. I am trying to create directories whenever a user signs up for an account.
For example: After recieving the success status from a signup function.
//Right after the signup, i am trying to do this to create directories.
$dirname = base_url().'uploads/'.$this->input->post('username').'/';
if(!is_dir($dirname)){
echo 'not a directory';
mkdir(base_url().'uploads/'.$this->input->post('username').'/');
}else{
echo 'is directory: '.$dirname;
}
Would be great if someone helps me out so that i can set the file permissions successfully. Thanks.