dedeai网站最新,展厅设计收费标准,网页设计报告结束语,百度搜不倒公司网站本文转载自#xff1a;http://blog.sina.com.cn/s/blog_9a06890901014ol1.html PHP页面跳转一、header()函数 header函数中Location类型的标头是一种特殊的header调用#xff0c;常用来实现页面跳转 注意#xff1a;1、location和“:”号间不能有空格#xff0c;否则不会跳…本文转载自http://blog.sina.com.cn/s/blog_9a06890901014ol1.html PHP页面跳转一、header()函数 header函数中Location类型的标头是一种特殊的header调用常用来实现页面跳转 注意1、location和“:”号间不能有空格否则不会跳转。 2、Localtion:后面有一个空格。 3、在用header前不能有任何的输出所以此函数只能放在文件的顶端。 示例此例会自动跳转到百度首页 ?phpheader(Location: http://www.baidu.com);exit;? PHP页面跳转二、Meta标签 若定义http-equiv为refresh,则打开该页面时将根据content规定的值在一定时间内跳转到相应页面。若设置content秒数;url网址则定义了经过多长时间后页面跳转到指定的网址。 示例此例会自动跳转到冠威博客首页 ?php$url http://www.guanwei.org; ? html head meta http-equivrefresh content1; url ?php echo $url; ? /head body页面只停留一秒…… /body /html PHP页面跳转三、JavaScript常用、推荐 示例1此例会自动跳转到冠威博客首页 ?php$url http://www.guanwei.org;echo !--script languagejavascript typetext/javascript;echo window.location.href$url;echo /script--;? 示例2此例会自动跳转到冠威博客首页 ?$urlhttp://www.guanwei.org;echo !--scrīpt LANGUAGEJavascrīpt;echo location.href$url;echo /scrīpt--;?