Advertisement
Guest User

Codeigniter video upload (view+controller)

a guest
May 22nd, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. //VIEW
  2.  
  3. <?php echo $error;?>
  4. <?php echo form_open_multipart('upload/do_upload');?>
  5. <input type="file" name="userfile" size="20" />
  6. <br /><br />
  7. <input type="submit" value="upload" />
  8.  
  9.  
  10.  
  11. //CONTROLLER
  12.  
  13. public function do_upload()
  14.         {
  15.                 $config['upload_path']          = './videos/';
  16.                 $config['allowed_types']        = 'avi|flv|wmv|mpeg|mp3|mp4';
  17.                 $config['max_size']             = 100;
  18.                 $config['max_width']            = 1024;
  19.                 $config['max_height']           = 768;
  20.                 $this->load->library('upload', $config);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement