Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($_FILES) {
- $covernumber = mt_rand(1000000000,9999999999);
- } else {
- $covernumber = 'defaultcoverimage';
- }
- $coverconfig['upload_path'] = './uploads/coverimages';
- $coverconfig['allowed_types'] = 'jpg';
- $coverconfig['max_size'] = '500';
- $coverconfig['max_width'] = '150';
- $coverconfig['max_height'] = '200';
- $coverconfig['remove_spaces'] = 'TRUE';
- $coverconfig['file_name'] = $covernumber;
- $this->load->library('upload', $coverconfig);
- $this->upload->do_upload('coverimage');
Add Comment
Please, Sign In to add comment