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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -