Php solves the problem related to the blank page to jump to due to incorrect input of parameters in the address bar.

Source: Internet
Author: User
Php solves the problem of a blank page that jumps to due to incorrect input of parameters in the address bar, such as the question. For example, is there such a URL as http: // localhost: 8080/test. php? Id = 12 & amp; tie = 23 I changed the last two parameters in the address bar to a large value, for example, 100000. The result is that there is no data output on the page, or php solves the blank page jump caused by incorrect input of parameters in the address bar
As the question. For example, is there such a URL as http: // localhost: 8080/test. php? Id = 12 & tie = 23
In the address bar, I changed the following two parameters to a large value, for example, 100000. The result is that no data is output on the page, or the parameter is changed to letters or Chinese characters, there is no data output. how can I set this link to jump to the error page I specified without displaying a blank page!

------ Solution --------------------
PHP code
If ($ _ GET ['A parameter '] = 'invalid') {die ('script localtion. href = "specify the url of the error interface" script ');}
------ Solution --------------------

Header ('Location: http://www.baidu.com /');
Exit;

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.