Rename file

See all posts See thread Reply

Re: Rename file new!
by colin, 14 years, 2 months ago
Please see the example on the main page

$foo = new Upload($_FILES['form_field']);
if ($foo->uploaded) {
  $foo->file_new_name_body = 'foo';
  $foo->Process('/home/user/files/');
  if ($foo->processed) {
    echo 'file_dst_name_body : '. $foo->file_dst_name_body;
  } else {
    echo 'error : ' . $foo->error;
  }
}
Reply