What's the function of the PHP header function? In PHP, the header function can be used as two special headers to send the status code, you can replace the previous same type of header, you can also force specify the value of the HTTP response, then
Php implements the header () function for reading and writing csv files using php to implement the header () function for reading and writing csv files using the definition and usage of the header () function to send the original HTTP header to the
Php implements the header () function for reading and writing csv files using php to implement the header () function for reading and writing csv files using the definition and usage of the header () function to send the original HTTP header to the
The header () method of PHP is generally used to tell the browser what to do, such as jump, refresh, and so on, and before calling the header method, what happens if you use echo to output some content? Does it affect the header function? We
What we're going to introduce to you today is about
PHP header function sends a 404 status code to the browserHeader ("http/1.1 404 Not Found");OrHeader ("http/1.1 404″");
PHP Header Function Permanent redirectHeader
For the header function, I use most of the jump page and set character sets, the other functions used relatively little.One, set character setsIn fact, we use the most in the HTML code in the tag inside the character set. The format is as
if (true)
{
Header (' location:http://bbs.it-home.org ');
}
File_put_contents (' test.txt ', ' OK ');//This line, generate a Test.txt file, the contents of the file is OK
Copy CodeIn this code, the careless programmer
The Header () function-is used to send raw HTTP headers.1. redirectHeader ("location:http://www.jb51.net";);Exit After each redirect, "Exit" must be added to avoid an error and continue execution.?>Header ("refresh:2;url=http://www.jb51.net";);echo "
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
If you have just started to learn PHP, there may be many functions need to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is a detailed use of the header function
If you have just started to learn PHP, there may be many functions need to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is a detailed use of the header function
In PHP, the use of the header function is very large, the header can not only send the original HTTP header information to the client, but also can directly implement the file download operationThe header function is most commonly used not for
In Our previous article, we introduced the header definition, so a lot of people see the title will ask before the introduction is to send the original HTTP header to the client? Is that really the case? Today, let's take a look at the role of the
The PHP tutorial header () function is described in detail with an example
Grammar
Header (string,replace,http_response_code) parameter description
string is required. Specifies the string of headers to send.
Replace is optional. Indicates whether
The usage and precautions of the header function in PHP are described in detail, and the phpheader function is described in detail. The usage and precautions of the header function in PHP are described in detail. voidheader (string $ string [, bool $
This article mainly introduces how php uses the Header function, PHP_AUTH_PW and PHP_AUTH_USER for user authentication, combined with the instance form, this article analyzes the PHP login verification using the Header function call and the skills
What we want to introduce to you today is
// The PHP header function sends a 404 status code to the browser.Header ("HTTP/1.1 404 Not Found ");OrHeader ("HTTP/1.1 404 ″);
// PHP header function permanent redirectionHeader ("Location:
Header ("http/1.1 404 Not Found");
Copy CodeFor the ErrorDocument 404/404.php function in Apache configuration, the
Error_page 404/404.php;
Copy CodeChange into
Error_page 404
Header ("location:http://www.php.net";);
Exit After each redirect, "Exit" must be added to avoid an error and continue execution.
?>
Header ("refresh:3;url=http://bbs.it-home.org");
Print (' Loading, please wait .
Header ("location:http://bbs.it-home.org";);
Exit After each redirect, "Exit" must be added to avoid an error and continue execution.
?>
Header ("refresh:3;url=http://bbs.it-home.org");
Print (' Loading, please
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.