title: Upload excel file in codeigniter Error Occure
body: <p>I upload excel file using Codeigniter This code working properly but my localhost then upload on live server then not uploaded </p>
  
  <p>This is my code </p>
  
  <p>function excelimport(){</p>
  
  <pre><code>$this-&gt;load-&gt;library('excel');           
          $file = $_FILES['userfileexcel']['tmp_name'];
          echo $file; 
                //read file from path
                $objPHPExcel = PHPExcel_IOFactory::load($file);
  
                //get only the Cell Collection
                $cell_collection = $objPHPExcel-&gt;getActiveSheet()-&gt;getCellCollection();
                //extract to a PHP readable array format
                foreach ($cell_collection as $cell) {
                    $column = $objPHPExcel-&gt;getActiveSheet()-&gt;getCell($cell)-&gt;getColumn();
                    $row = $objPHPExcel-&gt;getActiveSheet()-&gt;getCell($cell)-&gt;getRow();
                    $data_value = $objPHPExcel-&gt;getActiveSheet()-&gt;getCell($cell)-&gt;getValue();
                    //header will/should be in row 1 only. of course this can be modified to suit your need.
                    if ($row == 1) {
                        $header[$row][$column] = $data_value;
                    } else {
                        $arr_data[$row][$column] = $data_value;
                    }
  
                     // print_r($column);
                }
                //send the data in an array format
                $data['header'] = $header;
                 $data['values'] = $arr_data;
  
              $count=2;
               for($i=1;$i&lt;$row;$i++){
                $exceldata = array(
                  'title' =&gt; $data['values'][$count]['A'],
                  'quantity' =&gt;  $data['values'][$count]['B'],
                  'price' =&gt;  $data['values'][$count]['C']);             
                    print_r($exceldata);  
                //$this-&gt;upload_services-&gt;insert_excel($exceldata);
                $count++;   
              } 
  </code></pre>
  
  <p>}</p>
  
  <p>Error</p>
  
  <p>/tmp/phpYIZkd4</p>