PHP implements uploading binary files in text mode

WBOY
Release: 2016-08-08 09:33:42
Original
1661 people have browsed it

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
-------------------------------------------------- -------


PHP program to upload binary files in text format








         
Image upload







​​​

                           

                
                                                                                                                    
Save

Try it out
            
Read

            
                                                    
                                                                                         



-------------------------------------------------- -------

action.php
-------------------------------------------------- -------

The above introduces the PHP implementation of uploading binary files in text mode, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!