how could i upload pdf file using Codeigniter -


how upload pdf file using codeigniter? can sharing code? great me. searched not didn't specific solution.

//////////in controller

public function do_upload()     {             $config['upload_path']          = './uploads/';//file save path             $config['allowed_types']        = 'pdf';             $config['max_size']             = 100000;               $this->load->library('upload', $config);              if ( ! $this->upload->do_upload('userfile'))             {                     $error = array('error' => $this->upload->display_errors());                      $this->load->view('upload_form', $error);             }             else             {                     $data = array('upload_data' => $this->upload->data());                      $this->load->view('upload_success', $data);             }     } 

Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -