How to automatically add BOM header and explain BOM header and get rid of BOM header when PHP download file,
PHP download files automatically add BOM header, first of all to find out, what is the BOM header? When you save a text file in UTF-8
This article mainly introduces PHP use header way to achieve file download function, very good, with reference value, the need for friends can refer to the next
Let me introduce you to the PHP header () function
Definition and usage
The header ()
In a UTF-8 encoded file, BOM occupies three bytes in the file header to indicate that the file belongs to UTF-8 encoding. Currently, many software programs have recognized the bom header, but some cannot recognize the bom header, for example, PHP
PHP automatically adds a bom header when downloading files, explains the BOM header, and removes the bom header ,. How to automatically add a bom header and explain the BOM header and remove the bom header when downloading a PHP file? First, you
PHP uses the header method to download files,
First, we will introduce the PHP header () function.
Definition and usage
The header () function sends the original HTTP header to the client.
It is important to realize that the header () function must
PHP download files automatically add BOM header, first of all to find out, what is the BOM header? When you save a text file in UTF-8 format with a program such as Notepad under Windows, Notepad adds several invisible characters (the EF BB BF) to
If you are just beginning to learn PHP, there may be many functions to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is about the Header function detailed use
This site has previously shared a file download function, the specific article connection address is as follows:
PHP File Download function (code)
Recently a customer reflects that all the pictures on their website can not download, download the
PHP implementation of a file download code example,
PHP implementation file download code
PHP implementation file Download We need to use the header function to send the relevant information to the client browser, and then combine the FileSize
This site has previously shared a file download function, the specific article connection address is as follows:
PHP File Download function (code)
Recently a customer reflects their site all the pictures can not download, downloaded pictures are
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.