Guest User

Untitled

a guest
Jun 25th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. if ($_FILES != '') {
  2.                             $covernumber = mt_rand(1000000000,9999999999);
  3.                         } else {
  4.                             $covernumber = 'defaultcoverimage';
  5.                         }
  6.                                                
  7.                         $coverconfig['upload_path'] = './uploads/coverimages';
  8.                         $coverconfig['allowed_types'] = 'jpg';
  9.                         $coverconfig['max_size']    = '500';
  10.                         $coverconfig['max_width']  = '150';
  11.                         $coverconfig['max_height']  = '200';
  12.                         $coverconfig['remove_spaces']  = 'TRUE';
  13.                         $coverconfig['file_name']  = $covernumber;
  14.                        
  15.                         $this->load->library('upload', $coverconfig);
  16.                        
  17.                         $this->upload->do_upload('coverimage');
Add Comment
Please, Sign In to add comment