1, location and ":" No space between, otherwise it will be wrong.
2, before using the header can not have any output.
3. The PHP code after the header will also be executed.
Here is a comparison with the redirect Response.Redirect in asp:
Example 1:
Go to the blank page on the header (& quot; Location: empManage. php & quot;) page to find loginProcess. php: & lt ;? Php // accept user data // 1.id$ id =$ _ POST [& quot; id & quot;]; // 2 header ("Location: empManage. php ") jump to the blank
Response is used to implement redirection in asp. redirect function: Usage example: response. redirect .. /test. in aspphp, there are also similar functions: header Usage example: header (location :.. /test. php), but the two are different. the
The phpheader function downloads the file implementation code. In php, the header function is used heavily. the header can not only send the original HTTP header information to the client, but also directly implement file download operations, next,
To implement redirection in ASP is to use the Response.Redirect function:
To use one example:
Response.Redirect ". /test.asp "
There are similar functions in PHP: Header
To use one example:
Header ("Location:.. /test.php ");
But there is a
I wrote my own website that day and thought about the IP address restriction function. At least I should be able to set the IP address to be restricted in the background, and I should be able to restrict the IP address segment, such as 192.168.0. *
Opening and setting the rewrite module of Apache is not the topic of this Article. For more information, see
Article Details.
This class can only be used in PHP 5.30 or later versions, and inherits the features of fast redirection in the previous
In1. There must be no space between location and:. Otherwise, an error will occur.
2. There cannot be any output before using the header.
3. the PHP code after using the header in PHP will also be executed.
The following is a comparison with
Use PHP to connect to the database to implement the message board function.
PHP implements the message board function:
1 first, the login page:
message board logon internal message board of the Development Department // After logon, connect the
The header is divided into three parts:
The first part is the HTTP protocol version (http-version);The second part is state code (status);The third part is the causal phrase (reason-phrase).
Header () Function usage Description:
First, the role:~~
*/
The code is as follows
Copy Code
error_reporting (0);$conn = new COM ("Adodb.connection");$conn->open ("Driver={microsoft Access Driver (*.mdb)};" Dbq= ". Realpath ("Db.mdb"));$rs =new com ("Adodb.recordset"); $ABC = $
Class can only be used in PHP tutorials more than 5.30 versions. Inherited the features of the previous version of Fast redirection (separate classes, all using static calls), adding a very important feature and attribute that can invoke the modules
First of all, your site itself has multiple language versions. Otherwise you can only use JS to transform.1. Through the IP to locate, this to refer to the third-party interface for the full return of data, but do not know whether my network is too
For Apache rewrite modules to open and set up is not the subject of this article, please see the other article detailed.
This class can only be used in PHP version 5.30 or more. Inherited the features of the previous version of Fast redirection
For Apache rewrite modules to open and set up is not the subject of this article, please see the other article detailed.
This class can only be used in PHP version 5.30 or more. Inherited the features of the previous version of Fast redirection
Objective
This article describes the use of a jump in PHP header("location:test.php") to pay attention to the following points to help solve some novice frequently encountered problems
One, location and ":" No space between the number, or there
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
(This article reproduced: http://hi.baidu.com/pcbbt/item/03a53f3cda9827ffde222149)
PHP implements automatic login by remembering the password
PHP implements more than one method to remember the password for automatic login.
1. User Logon check
//
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.