Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $config['upload_path'] = './asset/uspic/'; //On "userpic" upload
- $config['allowed_types'] = 'jpg|png'; //Jpg and Png Only
- $config['max_size'] = '2048'; //2MB
- $config['max_width'] = '2048'; //max width images
- $config['max_height'] = '2048'; //max height images
- $config['encrypt_name'] = TRUE;
- //$config['file_name'] = $prna; //set new Name
- $this->load->library('upload', $config); //load library upload
- $fnm = null;
- //Photos is detected OK
- if ($this->upload->do_upload('img')){
- //Get Filename
- $fnm = $this->upload->data('file_name');
- //Update user table on "Photo" column where Mail as ID
- $this->waterm->uptabusr(array('surel' => $mail), array('photo' => $fnm));
- }
Add Comment
Please, Sign In to add comment