PHP ~ Upload Class overwrite

主要是要讓autorename = false + overwrite = true~


$directory = "../../downloads/logos/";
$handle = new Upload($_FILES['file']);
if ($handle->uploaded) {

$handle->file_new_name_ext = 'jpg';
$handle->file_auto_rename = false;
$handle->file_overwrite = true;
$handle->file_new_name_body = 'xxxxxxxx';
$handle->Process($directory);

}

http://www.verot.net/php_class_upload_faq.htm

沒有留言: