为什么这段代码不适用于Firefox和Internet Explorer

时间:2013-02-22 21:54:50

标签: internet-explorer firefox

你好我已经开发了这段代码

page1.php中

<META HTTP-EQUIV="Refresh" CONTENT="0; url=page2.php"> 

-

使page2.php

$referer = $_SERVER['HTTP_REFERER'];  
echo $referer;
$query = parse_url($referer, PHP_URL_QUERY);
parse_str($query, $queryArr);
$id = $queryArr['id'];
echo '<br>';
echo $h;

所以当我需要尝试代码时,我会转到链接 domain.com/page1.php?id=83

在chrome中显示

    domain.com/page.php?id=83
    83

和我的Firefox,Internet Explorer 它没有显示任何只是一个空白页面,我想知道如何修复此代码,以便它在所有浏览器上工作

1 个答案:

答案 0 :(得分:1)

也许你应该在第1页使用php标题重定向?

<?php header('Location: page2.php?id=83'); ?>