Heim  >  Artikel  >  Backend-Entwicklung  >  php页面跳转函数 页面重定向

php页面跳转函数 页面重定向

WBOY
WBOYOriginal
2016-07-25 08:54:18913Durchsuche
  1. if (isset($url))
  2. {
  3. Header("HTTP/1.1 303 See Other");
  4. Header("Location: $url");
  5. exit; //from bbs.it-home.org
  6. }
  7. ?>
复制代码

注意,"Localtion:"后面有一个空格。

二、用HTML标记 用HTML标记,就是用META的REFRESH标记。 举例:

  1. if (!isset($url)) exit;?>
  2. 复制代码

三、用脚本 举例如下:

  1. $url="http://bbs.it-home.org";
  2. echo "";
  3. echo "location.href="/′";$url′";
  4. echo "-->";
  5. ?>
复制代码

>>> 您可能感兴趣的文章: PHP页面跳转 Js页面跳转代码 PHP页面跳转(URL地址跳转)实现代码 PHP跳转函数代码分享 PHP 页面跳转的六种方式 PHP页面跳转代码的三种实现方式 PHP页面跳转的几种方式 PHP 页面跳转的多种方法总结 PHP 301跳转的方法详解 php url重定向(页面跳转)的代码 php实现页面跳转的别样方法 php实现页面跳转的几种方法



Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn