Welcome Guest, Not a member yet? Register   Sign In
upload in two diffrent path
#1

[eluser]misterone[/eluser]
Hello,

If i upload a file.
It must copy in two diffrent path's.
Wich script can i use ?

$config['upload_path'] = realpath('pictures/');
$config['allowed_types'] = 'gif|jpg|jpeg|png|mov|wmv|flv|mpeg|avi|mp4|3gp|amv';
$config['max_width'] = '1980';

$this->load->library('upload',$config);

if(!$this->upload->do_upload() == TRUE)
{
$data['content_view'] = 'upload';
$data['error'] = $this->upload->display_errors();

$this->load->view('start', $data);

}


In advance thanks.
#2

[eluser]Fireclave[/eluser]
You can use this function http://de2.php.net/manual/en/function.copy.php
#3

[eluser]misterone[/eluser]
Can i use two paths at this function :

$config[‘upload_path’] = realpath(‘pictures/’);

??
#4

[eluser]Fireclave[/eluser]
1. I think no, because this function will overwrite the first path
2. Why are you not using copy() ??




Theme © iAndrew 2016 - Forum software by © MyBB