title: codeigniter mkdir() Message: mkdir(): File exists
body: <p>A PHP Error was encountered
  Severity: Warning</p>
  
  <blockquote>
    <p>Message: mkdir(): File exists</p>
    
    <p>Filename: controllers/Galleries.php</p>
    
    <p>Line Number: 88</p>
    
    <p>Backtrace:</p>
    
    <p>File: C:\xampp\htdocs\cms\panel\application\controllers\Galleries.php
    Line: 88 Function: mkdir</p>
    
    <p>File: C:\xampp\htdocs\cms\panel\index.php Line: 315 Function:
    require_once</p>
  </blockquote>
  
  <p>I changed authorization permissions to code 0777 and others, it didn't work</p>
  
  <p>public function save(){</p>
  
  <pre><code>    $this-&gt;load-&gt;library("form_validation");
  
      // Kurallar yazılır...
      $this-&gt;form_validation-&gt;set_rules("title","Galeri Adı","required|trim");
  
      $this-&gt;form_validation-&gt;set_message(
          array(
              "required" =&gt; "&lt;b&gt;{field}&lt;/b&gt; alanı doldurulmalıdır"
              )
      );
  
  
      $validate=$this-&gt;form_validation-&gt;run();
  
  
  
      if ($validate) {
  
          $gallery_type=$this-&gt;input-&gt;post("gallery_type");
          $path="uploads/$this-&gt;viewFolder/";
          $folder_name="";
  
          if($gallery_type=="image"){
  
              $folder_name=convertToSEO($this-&gt;input-&gt;post("title"));
              $path="$path/images/$folder_name";
  
          } else if($gallery_type=="file"){
  
              $folder_name=convertToSEO($this-&gt;input-&gt;post("title"));
              $path="$path/files/$folder_name";
  
          }
  
          $create_folder=mkdir($path, 0755);
  
          if($create_folder){
  
              echo "olusturuldu";
  
          } else{
  
              echo "basarisiz";
  
          }
  
          die();
  </code></pre>