Home > Backend Development > PHP Tutorial > Question about uploading images based on local path in PHP?

Question about uploading images based on local path in PHP?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-18 09:15:28
Original
1413 people have browsed it

It is known that there are several pictures in a local directory, and the local physical addresses of these pictures, such as: file:///C:/Users/Administrator/Desktop/test/data/Taobao/contentPic/dress collar splicing Linen skirt 16/1643805e-1.jpg

Is there a way in PHP to upload images through this physical path? Just upload local pictures to the server?

Reply content:

It is known that there are several pictures in a local directory, and the local physical addresses of these pictures, such as: file:///C:/Users/Administrator/Desktop/test/data/Taobao/contentPic/dress collar splicing Linen skirt 16/1643805e-1.jpg

Is there a way in PHP to upload images through this physical path? Just upload local pictures to the server?

If in this scenario, the user accesses the program through a browser, then it is not possible because the browser does not allow reading of Dingdi files

Try the 'CURLFILE' class,

$xx = new CURLFILE($filename, 'type', name');

It’s difficult to answer on the mobile phone

To paraphrase your question, there are images in a folder on the server. Can I use php to upload them to the server?

This is copying, not uploading.

Otherwise, it will be no different from ordinary upload, regardless of whether it is the same machine.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template