Home PHP Libraries File upload class library A php file upload class library

This PHP file upload class is mainly used to upload files, including pictures, videos, and word documents. In fact, it is recommended to use it to process pictures. The main reason for recommendation is that this class is very standardized, and basically all upload parameters are They can all be defined in the class without modification in php.ini

Instructions for use:

By using PHP's global array $_FILES, you can upload files from the client computer to the remote server. The first parameter is the input name of the form, and the second subscript can be "name", "type", "size" ", "tmp_name" or "error".
like this:
$_FILES["file"]["name"] - The name of the uploaded file
$_FILES["file"]["type"] - The type of file being uploaded
$_FILES["file"]["size"] - Size of the uploaded file, in bytes
$_FILES["file"]["tmp_name"] - The name of the temporary copy of the file stored on the server
$_FILES["file"]["error"] - Error code caused by file upload
This is a very simple way to upload files. For security reasons, you should add restrictions on who has permission to upload files.

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

A php file upload class A php file upload class

25 Jul 2016

A php file upload 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 $

Share a PHP file upload class Share a PHP file upload class

25 Jul 2016

Share a PHP file upload class

A complete PHP file upload class example explanation, _PHP tutorial A complete PHP file upload class example explanation, _PHP tutorial

12 Jul 2016

A complete PHP file upload class example explanation. A complete PHP file upload class example is explained. This file upload class can customize the upload file size, upload file type and file storage address. There is a problem during use.

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.

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.

See all articles