Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 30th, 2012  |  syntax: None  |  size: 1.00 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Codeigniter - Fatal error
  2. if($this->input->file('userfile')){ //This is line 219
  3.     $config['upload_path'] = './uploads/';
  4.     $config['allowed_types'] = 'gif|jpg|png';
  5.     $config['max_size']    = '1000';
  6.     $config['max_width']  = '1024';
  7.     $config['max_height']  = '768';
  8.  
  9.     $this->upload->initialize($config);
  10.     $this->load->library('Multi_upload');
  11.  
  12.     $files = $this->multi_upload->go_upload();
  13.     //var_dump($files);
  14.     if ( ! $files )
  15.     {
  16.         $error = $this->upload->display_errors();                          
  17.         echo $error;
  18.         return false;
  19.     }
  20.     else
  21.     {
  22.         $data3 = array();
  23.         foreach ($files as $idx => $name) {
  24.             //var_dump($name['name']);
  25.             $data3[] = array(
  26.                 'relation' => $id_residence,
  27.                 'images' => $name['name'],
  28.             );
  29.         };
  30.         $data333 = $this->db->insert_batch('hotel_image', $data3);
  31.     }
  32. }
  33.        
  34. $myInput = $this->input->file('userfile');
  35. if(!empty($myInput)){
  36.     ...
  37.     ...
  38. }