PHP文件上传管理器 class.upload.php

码农软件 · 软件分类 · 文件上传组件 · 2019-03-30 16:12:05

软件介绍

class.upload.php 为你管理基于 HTTP 的文件上传,示例代码:

$foo = new Upload($_FILES['form_field']);
if ($foo->uploaded) {
 
// save uploaded image with no changes
  $foo
->Process('/home/user/files/');
 
if ($foo->processed) {
    echo
'original image copied';
 
} else {
    echo
'error : ' . $foo->error;
 
}
 
// save uploaded image with a new name
  $foo
->file_new_name_body = 'foo';
  $foo
->Process('/home/user/files/');
 
if ($foo->processed) {
    echo
'image renamed "foo" copied';
 
} else {
    echo
'error : ' . $foo->error;
 
}
 
// save uploaded image with a new name,
 
// resized to 100px wide
  $foo
->file_new_name_body = 'image_resized';
  $foo
->image_resize = true;
  $foo
->image_convert = gif;
  $foo
->image_x = 100;
  $foo
->image_ratio_y = true;
  $foo
->Process('/home/user/files/');
 
if ($foo->processed) {
    echo
'image renamed, resized x=100
          and converted to GIF'
;
    $foo
->Clean();
 
} else {
    echo
'error : ' . $foo->error;
 
}
}

It manages the uploaded file and allows you to do whatever you want with the file as many times as you want. If the file is an image, you can convert and resize it, rotate it, and crop it in many ways. You can also add borders, frames, bevels, add of text labels and watermarks, or apply various graphical effect filters. Security features and file management functions are provided. The class can also work on local files, which is useful for batch processing images online, and can circumvent open_basedir restrictions.

如果下面的网址无法访问,下载请进:http://freshmeat.net/projects/class_upload_php

本文地址:https://codercto.com/soft/d/2492.html

Python高性能编程

Python高性能编程

【美】 戈雷利克 (Micha Gorelick)、【美】 欧日沃尔德(Ian Ozsvald) / 人民邮电出版社 / 2017-7-1 / 79

本书共有12章,围绕如何进行代码优化和加快实际应用的运行速度进行详细讲解。本书主要包含以下主题:计算机内部结构的背景知识、列表和元组、字典和集合、迭代器和生成器、矩阵和矢量计算、并发、集群和工作队列等。最后,通过一系列真实案例展现了在应用场景中需要注意的问题。 本书适合初级和中级Python程序员、有一定Python语言基础想要得到进阶和提高的读者阅读。一起来看看 《Python高性能编程》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具