Home > Backend Development > PHP Tutorial > A simple example of an alternative PHP file upload_PHP tutorial

A simple example of an alternative PHP file upload_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 14:54:31
Original
1069 people have browsed it

A simple example of an alternative php file upload

$data = file_get_contents(“D:workslogo.png”); //Original file path
$ifp = fopen(“test.png”, “wb” ); //Open New file, if it does not exist, create the file
fwrite( $ifp, $data); //Write the stream of the original file to the new file
fclose( $ifp ); //Close the file operation stream
?>

Although this is simple, it will overwrite the source file, and I feel that sometimes unpredictable things will happen when using file functions~

This article address: http:/ /www.52blogger.com/archives/572 Please keep the reprint

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364634.htmlTechArticleA simple example of an alternative PHP file upload? $data = file_get_contents(D:workslogo.png); // Original file path $ifp = fopen(test.png, wb); //Open a new file, create it if it does not exist...
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
Why does it still jump after returning false?
From 1970-01-01 08:00:00
0
0
0
Optimize table indexes in MySQL
From 1970-01-01 08:00:00
0
0
0
Why can't I install it?
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