Reply to Re: How to process multiple images that are inside a folder?

Re: How to process multiple images that are inside a folder? new!
by Marcio Alves, 12 years, 6 months ago
Thanks Colin

But, I used the example 1 and returned the following error:

file not uploaded to the wanted location
Error: copy_failed


This is my code in full:

$handle = new Upload('/home/ceanorg/public_html/fotos/galeria/teste/', 'pt_BR');

if ($handle->uploaded) {
  
  $handle->image_resize            = true;
  $handle->image_ratio_y           = true;
  $handle->image_x                 = 100;
  $handle->Process('/home/ceanorg/public_html/fotos/galeria/teste/');
  
  // we check if everything went OK
  if ($handle->processed) {
    // everything was fine !
    echo '  file uploaded with success';
    echo '  ' . round(filesize($handle->file_dst_pathname)/256)/4 . 'KB';
    echo '  link to the file just uploaded: ../../fotos/galeria/teste/' . $handle->file_dst_name . ' : ' . $handle->file_dst_name . '';
  } else {
    // one error occured
    echo '  file not uploaded to the wanted location';
    echo '  Error: ' . $handle->error . '';
  }

} else {
  // if we're here, the upload file failed for some reasons
  // i.e. the server didn't receive the file
  echo '  file not uploaded on the server';
  echo '  Error: ' . $handle->error . '';
}
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important