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
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
31May2018
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.
10Feb2018
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.
20Jul2016
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,
29Jul2016
asp file upload: asp file upload php file upload class code: Copy the code as follows:
13Jul2016
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.
Hot Tools
Powerful php file upload class
Powerful php file upload class
PHP multi-file upload class that supports watermarks, dates, and thumbnails
PHP multi-file upload class that supports watermarks, dates, and thumbnails
PHP supports single or multiple file upload classes
PHP supports single or multiple file upload classes