manage uploaded files, and manipulate images in many ways
through an HTML form, a Flash uploader, XMLHttpRequest or on local files. 
Supported formats are PNG, JPG, GIF and BMP.
可以加边框,
示例:
一,操作本地文件
if(file_exists($localfile)){//本地文件
        $handle = new upload($localfile);//操作本地文件
        if ($handle->uploaded) {            
              $handle->file_name_body_pre   = 'thumb_';  //目标文件在原文件基础上加的前缀
              $handle->image_resize         = true;
              $handle->image_x              = 100;
              $handle->image_ratio_y        = true;
              $handle->process($localpath);     //目的文件保存路径         
              if($handle->processed) {                 
                 //$handle->clean();//delete the original uploaded file
                echo_1('ok');return;          
              }else{
                  echo_0($handle->error);return;                
              }
        }else{
            echo_0($handle->error);return;        
        }        
    }else{        
        echo_0('upload failed');return;    
    }
参考:

相关文章:

  • 2022-12-23
  • 2021-12-01
  • 2021-11-28
  • 2021-10-09
  • 2022-01-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
  • 2021-08-25
  • 2022-02-18
  • 2022-12-23
相关资源
相似解决方案