File Upload - success but 0 bytes |
I am uploading a text file and there doesn't appear to be any error message but afterwards, the uploaded file is empty - 0 bytes. Here is the code I'm using. Any ideas. I've got other features that upload files successfully and I've cloned that here.
$data['resultmsg'] = ""; $this->load->helper('form'); $config['upload_path'] = 'application/import/'; $config['allowed_types'] = 'txt'; $config['overwrite'] = true; $this->load->library('upload', $config); $this->upload->initialize($config); $this->upload->set_allowed_types('*'); $data['upload_data'] = ''; if (!$this->upload->do_upload('userfile')) { $data['resultmsg'] = $this->upload->display_errors(); } else { $data['resultmsg'] = "Upload success!"; $data['upload_data'] = $this->upload->data(); } |
Messages In This Thread |
File Upload - success but 0 bytes - by gerrylarry - 02-13-2017, 12:02 AM
RE: File Upload - success but 0 bytes - by andersonunsonst - 02-13-2017, 05:35 AM
|