0

Hi,
I am using codeigniter for multiple file uploading and it is giving me serious problems. The data from the files are coming to my controller. But when I try to run the upload script it gives me error that the
A PHP Error was encountered

Severity: Warning

Message: Illegal offset type in isset or empty

Filename: libraries/Upload.php

Line Number: 147

Also if this error does not occur. Then another error occurs.You did not select file to upload.My multiple uploading script is here. The problem is that the values are coming in the $value variable bur they are not uploading.Please help. Thanks in advance.

 $config['upload_path'] = $_SERVER['DOCUMENT_ROOT'].'/images/';
        $config['allowed_types'] = 'gif|jpg|jpeg|png';
        $config['max_size']    = '8024';
        $config['remove_spaces']= TRUE;  
        $config['encrypt_name'] = TRUE;

        $this->load->library('upload');

       foreach($_FILES as $key => $value)
        {

          if(isset($value['name']))
            {
                $this->upload->initialize($config);

                if (!$this->upload->do_upload($value['name']))
                {
                  $invalid=$this->upload->display_errors();

                }

                else {

                    $this->upload->data();

                }


             }


        }
3
Contributors
2
Replies
17
Views
4 Years
Discussion Span
Last Post by chetra
0

can you give me full code for upload multi file becuase i still not working.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.