php - codeigniter upload file redirects to unknown link -
this controller
public function upload_file(){ $this->load->helper('form'); $this->load->helper('url'); // set path store uploaded files $config['upload_path'] = './uploads/'; // set allowed file types $config['allowed_types'] = 'pdf'; // set upload limit, set 0 no limit //$config['max_size'] = 0; // load upload library custom config settings $this->load->library('upload', $config); if($this->upload->do_upload()){ $this->add_view(); }else{ print_r('x'); exit(); } }
and view
echo form_open_multipart('pdfuploads/upload');
the problem don't know why redirected link
http://localhost/tlc_hr/pdfuploads/upload
give correct controller , action here
echo form_open_multipart('controller/action');
and mentioned controller action upload_file()
Comments
Post a Comment