Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php // filename: gallery_model.php
- class Gallery_model extends CI_Model
- {
- var $gallery_path;
- function __construct()
- {
- parent::__construct();
- $this->gallery_path = realpath(APPPATH . '../public_html/imgs/upload');
- }
- function do_upload()
- {
- $config = array(
- 'allowed_types' => 'jpg|jpeg|gif|png',
- 'upload_path' => $this->gallery_path
- );
- $this->load->library('upload', $config);
- $this->upload->do_upload();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement