Welcome Guest, Not a member yet? Register   Sign In
Do a second library load
#1
Tongue 

PHP Code:
$this->load->library('uploadlib',array('dir'=>'uploads/biblioteca/','tipos'=>'pdf|doc|docx|txt'));
 
      
$livro
='livro';
$value=$this->upload($livro);
if(!
$value)
    return 
false;
$this->data['error'] = null;
$this->data['upload_data_livro']=$value;
 
      
$this
->load->library('uploadlib',array('dir'=>'images/capas/','tipos'=>'gif|png|jpg')); 

Second time
PHP Code:
$this->load->library('uploadlib',array('dir'=>'images/capas/','tipos'=>'gif|png|jpg')); 
doesn't load the parameters because uploadlib already loaded! how can i fix this? I) want to load the upload lib with the news parameters.
Thanks in advance
Reply
#2

You can use the librarie's initialize function, documentation here.

PHP Code:
$this->upload->initialize(array('dir'=>'images/capas/','tipos'=>'gif|png|jpg')); 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB