Get the App
SLTechnology News&Howtos  ›  Development  › 

How to upload multiple photos at a time by php

Shulou Source: shulou.com Published: 2022-06-02 05:16:24 10月05日 Update

This article mainly introduces how php can upload more than one photo at a time, which can be used for reference by interested friends. I hope you can learn a lot after reading this article.

Php can upload multiple photos at one time: 1, create index.html file; 2, create connection database conn.php file; 3, create picture processing upload.php file; 4, upload through "if ($error = = UPLOAD_ERR_OK) {...}".

This article operating environment: Windows7 system, PHP7.1 version, Dell G3 computer.

PHP realizes the function of uploading multiple pictures at once.

Recently encountered a demand, that is, multiple pictures upload, press and hold the Ctrl key can select multiple pictures one-time upload, after the successful upload of the database to save the image path and the original file name of the picture. This function is generally in the more mature content editor plug-ins, today specially singled out to tell you, the following in the local environment to demonstrate. A total of three files: index.html, conn.php, upload.php

Index.html file

Upload files

Connect to the database conn.php file

Tags: File picture data database article multiple photo multiple error one-time function suffix file name environment path processing success maturity three value Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Docker Microsoft NVidia Shulou Tech Info