I tried to upload some files using CodeIgniter, but at first: nothing happened, but the file does’nt seem do upload. I tried it by using
and then i tried to debug it by using
in the line where the conditional differs which is error or not. And i got this message: “you did not select a file to upload”.
And actually, it’s a simple solution to deal with this problem. i just change $this->upload->do_upload() to $this->upload->do_upload(“field_name”). where “field_name” is the name of the form we submitted by html. Aaand voila! It worked just fine.
One more thing, just in case you want to know, that i tried to make sure the file that i upload will overwrite the old one. In this case, i just put line $config(“overwrite => TRUE”), or you use array for this $config, just put the “overwrite => TRUE” thing alongside. It worked for me. Cheers.