CodeIgniter File upload not working and not giving error
<p>I am trying upload file from CodeIgniter. File not giving any error and even not storing file in uploads folder whic is in root directory or codeigniter. Can somebody help ? Please note as i already gave 755 permission to my uploads folder. below is my code</p>

<p>view file</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Upload Form&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;?php echo $error;?&gt;

&lt;?php echo form_open_multipart('UploadController');?&gt;

&lt;input type="file" name="userfile" size="20" /&gt;

&lt;br /&gt;&lt;br /&gt;

&lt;input type="submit" value="upload" /&gt;

&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Below is my controller </p>

<pre><code>&lt;?php

class UploadController extends CI_Controller {

    function __construct()
    {
        parent::__construct();
        $this-&gt;load-&gt;helper(array('form', 'url'));
    }

    function index()
    {
        $this-&gt;load-&gt;view('uploadview', array('error' =&gt; ' ' ));
    }

    function do_upload()
    {
        $config['upload_path'] = './uploads/';
        $config['allowed_types'] = 'gif|jpg|png';
        $config['max_size'] = '100';
        $config['max_width']  = '1024';
        $config['max_height']  = '768';

        $this-&gt;load-&gt;library('upload', $config);

        if ( ! $this-&gt;upload-&gt;do_upload("add_1"))
        {
            $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors());

            $this-&gt;load-&gt;view('upload_form', $error);
        }
        else
        {
            $data = array('upload_data' =&gt; $this-&gt;upload-&gt;data());

            $this-&gt;load-&gt;view('uploadview', $data);
        }
    }
}
?&gt;
</code></pre>

<p>please help me in this issue. </p>