Upload multiple files in CodeIgniter

后端 未结 7 1009
谎友^
谎友^ 2020-11-27 18:35

In my CodeIgniter project I\'m uploading files during the project creation. Here\'s the uploading function:

function uploadFiles(){

     $this->load->         


        
相关标签:
7条回答
  • 2020-11-27 19:26

    I modified Cubed Eye's MY_upload to return the file information of all files uploaded. As it was, only the last file's information was accessible when calling the data method. I also added the IP address of the uploader to that list.

    http://pastebin.com/tG8A85gY

    It can be utilized by the following:

    $upload_files = $this->upload->upload_files($project_files);
    if ($upload_files->status == true)
    {
    $fileInfo = $uploaded_files->file_info;
    }
    

    I realize this would be better off as an edit to Cubed Eye but this is my first post, I have no reputation.

    0 讨论(0)
提交回复
热议问题