Advertisement
ChapDaddy65

gallery_model.php

Sep 26th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <?php // filename: gallery_model.php
  2.  
  3. class Gallery_model extends CI_Model
  4. {
  5.     var $gallery_path;
  6.  
  7.     function __construct()
  8.     {
  9.         parent::__construct();
  10.         $this->gallery_path = realpath(APPPATH . '../public_html/imgs/upload');
  11.     }
  12.  
  13.     function do_upload()
  14.     {
  15.         $config = array(
  16.             'allowed_types' => 'jpg|jpeg|gif|png',
  17.             'upload_path' => $this->gallery_path
  18.         );
  19.  
  20.         $this->load->library('upload', $config);
  21.         $this->upload->do_upload();
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement