Is it a good idea to overwrite Super Global Variables ?? |
(09-14-2018, 11:18 AM)oppachoriya Wrote: In my opinion, we should discourage, happy to understand what best practice should be ? $upload_dir ='upload/'; if(isset($_FILES["sticker_image"]["name"]) && $_FILES["sticker_image"]["name"]!="") { $config['upload_path'] = $upload_dir; $config['allowed_types'] = 'png'; $file = time().'_'.str_replace(' ','_',$_FILES["sticker_image"]['name']); $insert["sticker_image"] = $file; $config['file_name'] = $file; $this->load->library('upload', $config); $this->upload->initialize($config); $this->upload->do_upload('sticker_image'); } Try this code. |
Messages In This Thread |
Is it a good idea to overwrite Super Global Variables ?? - by oppachoriya - 09-14-2018, 11:18 AM
RE: Is it a good idea to overwrite Super Global Variables ?? - by ignitedcms - 09-15-2018, 12:43 AM
RE: Is it a good idea to overwrite Super Global Variables ?? - by Gurutechnolabs - 10-25-2018, 02:59 AM
RE: Is it a good idea to overwrite Super Global Variables ?? - by InsiteFX - 10-25-2018, 04:02 AM
|