PHP program that uploads binary files in text mode. Currently, some websites automatically add Content-type: imagegif and other headers before the files, causing damage to the binary files. Therefore, when I write a file that is uploaded as a text file, the Content-type: image/gif header is automatically added in front of the file, leading to the destruction of the binary file. Therefore, I have compiled a PHP program for uploading binary files in text mode.
There are two files in total: index. php and action. php. Change the file name to test. put the two files together and run index. php, select read, Copy all the data read, run this program on the remote server, Paste to the input box, and choose save. The binary file is uploaded.
Index. php
---------------------------------------------------------
PHP program for uploading binary files in text mode
---------------------------------------------------------
Action. php
---------------------------------------------------------
Damaged image/gif header, causing damage to the binary file. Therefore, I have compiled a text-based binary Upload...