Home > Backend Development > PHP Tutorial > 浅析php header 跳转_php技巧

浅析php header 跳转_php技巧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-17 09:01:06
Original
1053 people have browsed it

PHP的header函数 可以很少代码就能实现HTML代码中META 标签
这里只说用 header函数来做页面的跳转

1. HTML代码中页面的跳转的代码
HTML meta refresh 刷新与跳转(重定向)页面
refresh 属性值 -- 刷新与跳转(重定向)页面
* refresh用于刷新与跳转(重定向)页面
* refresh出现在http-equiv属性中,使用content属性表示刷新或跳转的开始时间与跳转的网址
* 引用网址:http://www.dreamdu.com/xhtml/refresh/

meta refresh示例
5秒之后刷新本页面:

5秒之后转到梦之都首页:

2. PHP中使用header函数
上面已经了解了HTML中写跳转(重定向)页面的代码
php代码示例
header('Refresh: 3; url=http://www.jb51.net');

Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template