2016-09-21 3 views
0

私はhttps://www.verot.net/ からのクラスアップロードを使用してアップロードイメージを作成しています。出力イメージ2(実際の写真と編集サイズ変更写真)。 はすべて動作しますが、アップロードの処理中に時間を無駄にします。 アップロードの前後で実際の写真のサイズを確認した場合、サイズは同じではありません。他に使用して私の最後のコードでクラスアップロードアップロードを使用してメモリ制限と低速アップロード

$counter=1; 
    foreach ($files as $file) { 
     $handle = new Upload($file); 
     if ($handle->uploaded) 
     { 
      $handle->Process("real"); 
      $handle->dir_chmod = 0777; 
      //$handle->jpeg_quality = 85; 
      //jenis file yang diijinkan 
      $handle->allowed = array('image/*');//VALIDASI UPLOAD GAMBAR 
      //$handle->image_resize   = false; 

      /*----first-START----*/ 
      if ($handle->processed) { 
       ${'pathPhotoReal'.$counter} = 'real/'.$handle->file_dst_name; 
       echo ${'pathPhotoReal'.$counter}."<br>"; 
       ${'namaFoto'.$counter} = $_POST['text'.$counter]; 
       echo ${'namaFoto'.$counter}."<br>"; 
       } 
      else { 
       // one error occured 
       echo ' Error: ' . $handle->error . ''; 
      } 
      /*----first-FINISH----*/ 

      // we now process the image a second time, with some other settings 
      //$handle->allowed = array('image/*'); 
      $handle->image_ratio = true; 
      $handle->image_ratio_fill = true; 
      $handle->image_resize  = true; 
      $handle->image_x   = 300; 
      $handle->image_y   = 300; 
      $handle->Process('edit'); 

      /*----second-START----*/ 
      if ($handle->processed) { 
       ${'pathFotoEdit'.$counter} = 'edit/'.$handle->file_dst_name; 
       echo ${'pathFotoEdit'.$counter}."<br>"; 
       } 
      else { 
       // one error occured 
       echo ' Error: ' . $handle->error . ''; 
      } 
      /*----second-FINISH----*/ 

      $counter = $counter + 1; 
      //$handle->clean(); 
     else { 
      // if we're here, the upload file failed for some reasons 
      // i.e. the server didn't receive the file 
      echo ' File not upload ' . $handle->error . ''; 
      echo($handle->log); 
     } 
    } 

{エコー「ファイルアップロードしません」。 $ handle->エラーです。 '';} これは常に表示されます。フォルダ内に写真が保存されています。私は成功をアップロードすると思います。

答えて

1

filezillaからフォルダのアクセス許可を変更してみます。 これで、サーバーがあなたがそれらのペルミソを作ることを許可するかどうかを知ることができます

関連する問題