Author: spiderI also come to a super small PHP pony. Copy codeThe Code is as follows:Header ("content-Type: text/html; charset = gb2312 ");If (get_magic_quotes_gpc () foreach ($ _ POST as $ k => $ v) $ _ POST [$ k] = stripslashes ($ v );?>Save file
Usage of the PHPheader () function (incorrect settings such as 301 and 404)
Header ("HTTP/1.1 404 Not Found ");
For the ErrorDocument 404/404. php function in apache configuration
Error_page 404/404
1. function: supports resumable download, compute the transfer rate, and control the transfer rate. easy to use:
The code is as follows:
$ Object = new httpdownload ();$ Object-> set_byfile ($ file) % N # H # %; // server file name, including Path$
Use the swoole_http_response method header, status, and end to redirect the code as follows {code ...} however, after redirect () is used, the program is not interrupted and continues to be executed. later, I throw an exception to interrupt the
Author: Spider
I'm going to have a little php pony too.
Copy CodeThe code is as follows:
Header ("content-type:text/html; charset=gb2312 ");
if (GET_MAGIC_QUOTES_GPC ()) foreach ($_post as $k = $v) $_post[$k] = stripslashes ($v);
?>
if (! (
// The following is the class and function definition classZip // ZIP compression class {var $ datasec, $ ctrl_dir = array (); var $ eof_ctrl_dir = & quot; \ x50 \ x4b \ x05 \ x06 \ x00 \ x00 \ x00 \ x00 & quot; var $ old_offset = 0
// The
Header ("Location:http://www.php.net");
?>
Copy Code forces users to get the latest information each time they access the page, rather than using a cache that exists on the client.
Tell the
// Created by Bouchon// Http://dev.maxg.info
// Need help? Http://forum.maxg.info
Class zip{
VaR $ datasec, $ ctrl_dir = array ();VaR $ eof_ctrl_dir = "/x50/x4b/x05/x06/x00/x00/x00/x00 ";VaR $ old_offset = 0; var $ dirs = array (".");
Function
Easy to use:
CopyCode The Code is as follows: $ object = new httpdownload ();
$ Object-> set_byfile ($ file) % N # h # %; // server file name, including path
$ Object-> filename = $ filename; // download the file name saved
$ Object-> download ();
3
It mainly involves three attributes in the header.
Lastmodified: Sets the last modification time. The browser sends a "If-modified-Sinc" header next time. If the content is not updated after this time, the server directly returns a 304 not modified
No matter how many headers the page has, it executes the last one, but it is conditional, for example:Header (' location:http://www.jb51.net ');Header (' location:http://www.g.cn ');Header (' location:http://www.baidu.com ');This will jump to
Header () Function usage Description:
first, the role:~~~~~~~~~
PHP is only the HTTP protocol to the HTML document to the browser, tell the browser how to deal with this page, as for the transfer of the content you need to familiarize yourself
Did you find the examples in the previous chapters too monotonous? Haha, I believe you will know that it is too weak to display text. Now let's take a look at the table rendering and check box functions provided by ExtJs. Some people asked me why
In php, URL redirection is inseparable from header functions no matter which method. Below I will organize some common URL jump implementation programs and methods for you. If you need them, please refer to them. In php, URL redirection is
If the program has an exception, the thinkphp default is to throw 404 headers.ThinkPHP3.2.3 Related code:#/thinkphp/library/think/think.class.php /** * Custom exception handling * @access public * @param mixed $e Exception Object *
The headerlocation redirection statement fails to redirect the page. Function header: page jump http header information has many functions, mainly including the following: 1. jump when the browser accepts Location: xxxx in the header information,
If your page appears 301 or 404 for the user experience is a very serious problem, so we do php header301 or 404 must be careful and careful, and I came to see.
301 Jump
The code is as follows
Copy Code
Header (' http/1.1
Let's take a look at the effect. The artist was not good. He smiled. Haha.The Silverlight DataGrid does not provide the paging function, and its sorting is also performed on the content of the current page. These two functions must be included in
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.