【发布时间】:2011-06-02 06:19:42
【问题描述】:
我正在尝试将一个页面重定向到另一个页面,并且运行成功。但是,我正在尝试将第一页重定向到带有广告的另一个页面。该页面将在五秒后重定向到另一个页面。
我正在尝试这样做:
<?php
include('ads.php');
?>
<?php
sleep(2);
$url = $_GET['url'];
header("Location: ".$url."");
exit;
?>
但是,它完美地显示了ads.php 中的广告,但五秒钟后它没有重定向。我在我的网络浏览器中收到此错误:
Warning: Cannot modify header information - headers already sent by
(output started at /home/nucleusi/public_html/adverts/ads.php:1)
in /home/nucleusi/public_html/adverts/index.php on line 7
我将重定向到的典型链接是这样的:
http://domain.com/adverts/index.php/?url=http%3A%2F%2Fitunes.apple.com%2Fmx%2Falbum%2Fstill-got-the-blues%2Fid14135178%3Fi%3D14135158
【问题讨论】:
-
我想看看答案。这将是惊人的
-
@Col。弹片 - 认为圣诞节是几天前的美好时光。 :-)