title: Codeigniter make directory if not exist
body: <p>Hi can anyone help me with this. Basically I used the file uploading class of codeigniter the link is 
  <a href="http://ellislab.com/codeigniter/user-guide/libraries/file_uploading.html" rel="noreferrer">here</a>
  and it works fine! but I need to know how to create directory inside this default upload path <code>$config['upload_path'] = './uploads/'</code> the name of the folder is the date today this is my sample code.</p>
  
  <pre><code>date_default_timezone_set('Asia/Manila');
  $date = date('Y-m-d H:i:s');
  
      $config['upload_path'] = './uploads/'.$date;
      $config['allowed_types'] = 'jpg|jpeg|gif|png';
      $config['max_size'] = '100';
      $config['max_width']  = '1024';
      $config['max_height']  = '768';
  
  
  if (!is_dir('uploads/'.$date)) {
  mkdir('./uploads/' . $date, 0777, TRUE);
  
  }
  </code></pre>
  
  <p>and I got an error like</p>
  
  <pre><code>Message: mkdir(): Invalid argument
  </code></pre>
  
  <p>I search how it will be fix and they say this <code>0777</code> CI permission will do, but still it won't work for me.</p>
  
  <p>Thanks for any response.</p>