title: Codeigniter File Upload Not Working On Live Server
body: <p>I cant upload the image into the folder online, but it works perfectly on localhost.</p>
  
  <p>Below Is My Code</p>
  
  <pre><code>$this-&gt;load-&gt;helper(array('form', 'url'));
  if (empty($_FILES['photo']['name'])) {
      $image=$this-&gt;input-&gt;post('image');
  } else {
      $config = array(
          'upload_path' =&gt; "uploads/",
          'allowed_types' =&gt; "gif|jpg|png|jpeg",
      );
      $this-&gt;load-&gt;library('upload',$config); 
  
      if($this-&gt;upload-&gt;do_upload('photo')) {
          $upload_data = $this-&gt;upload-&gt;data();
          $image = $upload_data['file_name'];
      } else {
          $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors());
          redirect(base_url().'uploaderror');
      }
  }
  </code></pre>
  
  <p>Please help finding the solution
  Thanks</p>
  
  <p>Guys Thanks for your help the problem was with the php version in the server
  i fixed it</p>