Php page jump code enter url jump to your defined page _ PHP Tutorial

Source: Internet
Author: User
Php page jump code enter the URL to jump to your defined page. The code is very simple and involves the use of the header function. the code is as follows :? Phpif (! Empty ($ _ SERVER [HTTPS]) (on $ _ SERVER [HTTPS]) {$ uri;} the els code is simple and involves the use of the header function. the code is as follows:

The code is as follows:


If (! Empty ($ _ SERVER ['https']) & ('on' ==$ _ SERVER ['https']) {
$ Uri = 'https ://';
} Else {
$ Uri = 'http ://';
}
$ Uri. = $ _ SERVER ['http _ host'];
Header ('Location: '. $ uri.'/demo /');
Exit;
?>


Code explanation: I will first determine whether you have enabled https. if it is a normal https page, if it is not started, it will jump to the project directory.

The pipeline code is as follows :? Php if (! Empty ($ _ SERVER ['https']) ('on' === _ SERVER ['https']) {$ uri = 'https ://';} els...

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.