Home >Backend Development >PHP Tutorial >PHP implements uploading binary files in text mode
Now when some sites upload files, they will automatically add headers such as Content-type: image/gif in front of the file, causing the binary file to be damaged. So I wrote a php program to upload binary files as text.
There are two files in total: index.php, action.php. Change the file name of the file to be uploaded to test, put it together with these two files, run index.php, select read, copy all the data read, also run this program on the remote server, Paste to input box, select Save. The binary file is uploaded.
index.php
-------------------------------------------------- -------
Image upload |
|