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