PHP页面跳转的三种方式

PHP页面跳转一:header()函数

header()函数的定义如下:

void header (string string [,bool replace [,int http_response_code]])

//重定向浏览器

header(“Location: http://blog.csdn.net/abandonship”);

 

PHP页面跳转二、Meta标签

Meta标签是HTML中负责提供文档元信息的标签,在PHP程序中使用该标签,也可以实现页面跳转。若定义http-equiv为 refresh,则打开该页面时将根据content规定的值在一定时间内跳转到相应页面。若设置content=”秒数;url=网址”,则定义了经过 多长时间后页面跳转到指定的网址。

< meta http-equiv=”refresh” content=”1;url=http://blog.csdn.net/abandonship”>

 

PHP页面跳转三、JavaScript echo下面js代码

window.location.href=’$url’

编程技巧