Use header in php to set content-type and content-type of common file types
Use header in php to set content-type and content-type of common file types
In PHP, you can use the header function to send header information and set the content-type
What does the header tag in HTML5 mean? How to use header tags in HTML5 do you know? This article mainly introduces the HTML5 's head label
Introduction to the homepage:
welcome to my homepagemy name is Donald duckthe Rest of my home
According to Mr. Peng Wuxing's PHP Le, the header can send the Status header, as shown inHeader ("Status: 404 Not Found ");?>In this way, the user's browser can see the 404 error that the file cannot be found, but I tried this.Later, I checked the
Using header to export Excel garbled and broken
This post was last edited by u014474944 on 2014-04-11 10:53:45
The code is as follows
Header ("Content-type:application/vnd.ms-excel"); Header
Sometimes in order to hide the real download address, we defined the header as a file and then readfile the download, but this will increase the burden on the server, generally do not recommend download a large number of files The code is as
As described in PHPBIBLE by Mr. Peng Wuxing, the header can send the Status header, such? Phpheader (Status: 404 NotFound );? In this way, the user's browser can see the 404 error that the file cannot be found, but I tried this. Later, I checked the
Sometimes we in order to hide the real download address, we use the header definition as a file and then ReadFile download, but this will increase the burden on the server, generally not recommended to download a larger number of files
The code is
As described in Mr. Pengwuchen's PHP BIBLE, the header can send a status header, such as
header ("status:404 not Found");
?>
can make the user's browser appear file cannot find 404 error, but I tried this is not possible.
later I went
Original Address:Use header or meta to achieve the difference between PHP page encoding
Author:Small leaf One, page coding
1. Use of Label Settings page encoding
The role of this label is to declare the client's browser with what character set code
Copy Code code as follows:
$filename = ' path + actual filename ';
Type of File
Header (' content-type:application/pdf ');
Download the displayed name
Header (' content-disposition:attachment filename= file name when saved; PDF ');
void header (String $string [, bool $replace = true [, int $http _response_code]]): Send a raw HTTP header
Here are several uses of header:
1, use header function to jump page;
Header (' Location: '. $url);
Where $url is the URL that will
PHP creates desktop shortcuts and php shortcuts. PHP creates a desktop shortcut instance. to use php to create a desktop shortcut, we need to use header, InternetShortcut, and some code that I don't understand. Method: Create a desktop shortcut
The company project needs to send the mail through the background, the message content includes the picture attachment. If sent through Phpmailer, because the mail server may have latency, send mail through Phpmailer, you need to wait for the
To create a desktop shortcut using php, we need to use header, InternetShortcut, and some code that I don't understand. Method: Create a php file, and then throw the following code to ensure
To create a desktop shortcut using php, we need to use
Really dare not say is here "speak" GD library, because I use GD also only one or two times, most of the function has not
have access to. But the three bamboo small diao enthusiastically to me manuscripts, I had to bite the bullet to write a little
PHP uses header () to output the image cache instance ,. PHP uses header () to output an image cache instance. this example describes how PHP outputs the image cache using header. Share it with you for your reference. The specific analysis is as
Use the header in php to set the content-type and common file types. In php, you can use the header function to set content-type and common file types in content-typephp. in PHP, you can use the header function to set content-type and common file
In php, the header () implements the page jump method. In this article, we use the header () function to perform page Jumps. we will introduce status redirects such as 404,302,301. below are a lot of status-based custom functions that can be tested.
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.