有时可能会因禁用或拒绝接受Cookie而导致此问题

时间:2011-07-30 10:08:42

标签: php drupal drupal-6

在编写php重定向时,我在drupal6中遇到了以下问题。

这是问题所在:

页面未正确重定向Firefox检测到服务器正在以永远无法完成的方式重定向此地址的请求。

  

有时可能会因禁用或拒绝接受Cookie而导致此问题。

我编写的代码如下:

global $base_url,$user;
$uid = $user->uid;

$msg = "Please select your user type (capital provider or project sponsor) and agree to the terms and conditions. Then, you’ll be able to post and find capital or a project in which to invest.";

$url =  $base_url."/editProfile?message=".$msg;

header("Location: $url");

请帮帮我

谢谢&的问候,

K.Ramakrishna

1 个答案:

答案 0 :(得分:1)

您需要测试当前页面是否与您要重定向到的页面相同。

if (getCurrentPage() == "editProfile" && getCurrentMessage() == $msg) THEN DO NOT REDIRECT
相关问题