Home PHP Libraries Other libraries File and image upload PHP class
File and image upload PHP class
<?php
 */
class UploadFile{
  public $maxSize = -1;
  // 是否支持多文件上传
  public $supportMulti = true;
  // 允许上传的文件后缀
  //  留空不作后缀检查
  public $allowExts = array();
  // 允许上传的文件类型
  // 留空不做检查
  public $allowTypes = array();
  // 使用对上传图片进行缩略图处理
  public $thumb   =  false;
  // 缩略图最大宽度
  public $thumbMaxWidth;
  // 缩略图最大高度

Image uploading is often used in our projects. There is almost no project that can be separated from image or file uploading.

What I bring to you this time is a useful PHP class for uploading files and images

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

PHP file upload (powerful file and image upload class)_PHP tutorial PHP file upload (powerful file and image upload class)_PHP tutorial

20 Jul 2016

PHP file upload (powerful file and image upload class). PHP file upload (powerful file and picture upload class) This practical code for file upload can easily upload files or pictures you specify, and can also quickly limit the upload of picture file types.

Implementation code of PHP file upload class and image processing class Implementation code of PHP file upload class and image processing class

25 Jul 2016

Implementation code of PHP file upload class and image processing class

PHP file upload class and PHP encapsulated multi-file upload class sharing PHP file upload class and PHP encapsulated multi-file upload class sharing

10 Feb 2018

This article mainly shares with you the relevant code of the PHP file upload class and the PHP encapsulated multi-file upload class. It has a certain reference value. Interested friends can refer to it. I hope it can help everyone.

PHP multiple file upload class PHP multiple file upload class

01 Dec 2016

&lt;?php /* * @(#)UploadFile.php * * Can handle multiple uploaded files by users at the same time. After verifying the validity of the file, store it in the specified directory. * Can return useful information about uploaded files for use by other programs. (Such as file name, type, size, save path) * Please see the information at the bottom of this class (UploadFile class usage notes) for usage methods. * */ class UploadFile { var $user_pos ...

PHP image file upload class (can automatically generate thumbnails) PHP image file upload class (can automatically generate thumbnails)

25 Jul 2016

PHP image file upload class (can automatically generate thumbnails)

Detailed explanation of php file upload class examples Detailed explanation of php file upload class examples

02 Jun 2018

This article mainly introduces the PHP file upload class, and analyzes the type judgment of PHP upload files, computer size restrictions and other techniques in the form of a complete example. Friends in need can refer to it.

See all articles