search
HomePHP LibrariesOther librariesFile 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

Usage analysis of CI framework file upload class and image processing class, ci file upload_PHP tutorialUsage analysis of CI framework file upload class and image processing class, ci file upload_PHP tutorial

12Jul2016

CI framework file upload class and image processing class usage analysis, ci file upload. Usage analysis of CI framework file upload class and image processing class, ci file upload This article describes the usage of CI framework file upload class and image processing class with examples. Share it with everyone for your reference, as follows:

How to Efficiently Store Image File Names and Associated Data During Upload?How to Efficiently Store Image File Names and Associated Data During Upload?

29Nov2024

Storing File Name and Other Data While Uploading an ImageUploading an image to a server and storing its file name in a database while...

PHP upload image class and usage examples, _PHP tutorialPHP upload image class and usage examples, _PHP tutorial

12Jul2016

PHP upload image class and usage examples. PHP upload image class and usage examples. This article describes the PHP image upload class and usage examples. Share it with everyone for your reference, the details are as follows: 1. The class file name is: upclass.php phpclass up

PHP image upload class (added thumbnail)PHP image upload class (added thumbnail)

06Jul2016

PHP image upload class (added thumbnail)

How can I upload an image and store its file name in a MySQL database along with other form data using PHP?How can I upload an image and store its file name in a MySQL database along with other form data using PHP?

26Oct2024

How to Store a File Name in a Database with Other Information While Uploading an Image Using PHPProblem:You're facing challenges in uploading a...

Multi-file upload class implemented in PHP and usage examples, _PHP tutorialMulti-file upload class implemented in PHP and usage examples, _PHP tutorial

12Jul2016

Multi-file upload class implemented in PHP and usage examples. Multi-file upload class and usage examples implemented in PHP. This article describes the multi-file upload class and usage examples implemented in PHP. Share it with everyone for your reference, the details are as follows: 1. upFiles.css.php

See all articles