PHP Classes


Recommend this page to a friend!

      class.upload.php  >  All threads  >  file_overwrite  >  (Un) Subscribe thread alerts  
Summary:file_overwrite does not work
Author:Said Bakr
Date:2008-04-08 23:58:33
Update:2009-04-23 05:23:23

  1. file_overwrite   Reply   Report abuse  
Said Bakr - 2008-04-08 23:58:33

The property file_overwrite when set to true should lead to overwrite the new prcessed file if there is a file with the same name. The situation I found that it keeps trailing the new file name with _x where x is an integer. Is using file_new_name_body make a confilict?

Here is the code:

function upImage($dest,$frmFld,$name){
global $siteAbsPath;
$handle = new upload($_FILES[$frmFld]);

if ($handle->uploaded){
$handle->file_overwrite = true;
$handle->file_new_name_body = $name;
$handle->image_resize = true;
$handle->allowed = array('image/*');
$handle->file_max_size = '21000';
$handle->image_x = 60;
$handle->image_ratio_y = true;


if ($handle->processed) {
return true;
} else {
die( 'error : ' . $handle->error);



  2. Re: file_overwrite   Reply   Report abuse  
Mojoinst H - 2009-04-23 05:23:23 - In reply to message 1 from Said Bakr
I am having the same problem... very freustrating!

Anyone know where to fix?