Home PHP Libraries File upload class library PHP encapsulated single file (picture) upload class
PHP encapsulated single file (picture) upload class Mainly introduces the single file (image) upload class encapsulated by PHP, and analyzes the relevant processing skills of PHP image file upload operation in the form of a complete example for friends to learn and reference.
Parameter 1: $file file array 5 attribute values ​​name, type, size, tmp, error
Parameter 2: The path to save the file $path
Parameter 3: Types allowed for file upload $allow array $allow=array('image/jpeg','image/jpg','image/png','image/gif')
Parameter 4: The maximum size allowed for file upload $size
Return value: return $imageNameThe name of the file
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 encapsulated single file upload class PHP encapsulated single file upload class

31 May 2018

This article mainly introduces the single file (image) upload class encapsulated in PHP, and analyzes the related processing skills of PHP image file upload operation in the form of a complete example. Friends in need can refer to it.

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.

Completely encapsulated php upload file class Completely encapsulated php upload file class

25 Jul 2016

Completely encapsulated php upload file class

PHP file upload class (this class supports single or multiple file uploads) (1/2)_PHP tutorial PHP file upload class (this class supports single or multiple file uploads) (1/2)_PHP tutorial

20 Jul 2016

PHP file upload class (this class supports single or multiple file uploads) (1/2). PHP file upload class (this class supports single or multiple file uploads) /** * Class name: upfile * Function: handles file uploads * Description, this class handles single or multiple file uploads. When using this class,

asp file upload php file upload class code asp file upload php file upload class code

29 Jul 2016

asp file upload: asp file upload php file upload class code: Copy the code as follows: <?php /** * File upload class */ class uploadFile { public $max_size = '1000000';//Set the upload file size public $file_name = 'date';//The renaming method represents naming based on time, and others use the given name public $allow_types;//The file extensions allowed to be uploaded, different file types are separated by "|" public $

PHP file upload class PHP file upload code_PHP tutorial PHP file upload class PHP file upload code_PHP tutorial

13 Jul 2016

PHP file upload class PHP file upload code. A simple PHP file upload class, an image processing class discovered when sorting out PHP classes. There are already many classes for PHP to process images, including those that process images individually, and some that add watermarks.

See all articles