Category : Codeigniter

12 posts

public function image(){ $files = $_FILES; $cpt = count($_FILES[‘userfile’][‘name’]); for($i=0; $i<$cpt; $i++) { $_FILES[‘userfile’][‘name’]= time().$files[‘userfile’][‘name’][$i]; $_FILES[‘userfile’][‘type’]= $files[‘userfile’][‘type’][$i]; $_FILES[‘userfile’][‘tmp_name’]= $files[‘userfile’][‘tmp_name’][$i]; $_FILES[‘userfile’][‘error’]= $files[‘userfile’][‘error’][$i]; $_FILES[‘userfile’][‘size’]= $files[‘userfile’][‘size’][$i]; $this->upload->initialize($this->set_upload_options()); $this->upload->do_upload(); $fileName = $_FILES[‘userfile’][‘name’]; $images[] = $fileName; } $image = implode(‘,’,$images); $this->image_model->addimages($image); }   Upload an image options public function set_upload_options() { $config = array(); $config[‘upload_path’] = ‘assets/upload/package/’; //give the path …
CodeIgniter is an Application Development Framework – a toolkit – for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple …
PAGE TOP
error

Enjoy this blog? Please spread the word :)

RSS
Follow by Email