php header 转发网址的两种方法(Location和Refresh)

| | Comments (0)



php header 网址的方法应该有很多,程序的设计可以通过很多途径来达到目的,逻辑思想往往影响着程序员开发程序的好坏,程序员需要一个思维清晰但又简单的大脑,经常动脑程序员大多掉发严重,呵呵。
方法一、
header("Location: $url"); /* Redirect browser */

方法二、
header('Refresh: 5; url='.$url2.''); /* Refresh browser  after 5 seconds*/





区别在于,lacation 直接转向目标网址,refresh可以设定多长时间后转向目标网址,这两个都不可以在新窗口中打开网址。

单点日志:http://spoint.babyshoot.cn

Leave a comment

Archives

Ads by google

Pages

Powered by Movable Type 4.24-en

About this Entry

This page contains a single entry by 单点日志 published on July 3, 2011 2:22 PM.

国外美国主机 bluehost主机使用评测 bluehost速度怎么样 was the previous entry in this blog.

最美、最伟大、最可爱的妈妈"吴菊萍" is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.