如何包含会话日志文件

时间:2009-12-17 11:56:59

标签: php session cookies logging

[PHP]     

$filename = "./logs/".$_SESSION['uniqueID'].".php" ; // output 4b1e7b3489549.php

$data = "bla..bla..\n";

$data = stripcslashes($data);

/* Writing file configurations */
    $buat = fopen($filename, "w+");
    fwrite($buat, "$data");
    fclose($buat);
?>

[/ PHP] 现在我从$ filename(record.php)中调用来自下面的click.php页面的输出文件: [PHP]     

$filelog2 = "./logs/config.php";

    if(file_exists($filelog1)){
        require_once $filelog1;
    }else{
        require_once $filelog2;
    }

echo "$filelog1 , $filelog2";// test
?>

[/ PHP] 当我转到页面click.php我在我的firefox浏览器下面出现页面加载错误,这个问题是什么以及如何解决它?三江源...

重定向循环

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

浏览器已停止尝试检索所请求的项目。该网站以永远不会完成的方式重定向请求。

  • 您是否已禁用或阻止此网站所需的Cookie?

1 个答案:

答案 0 :(得分:1)

我怀疑这与您发布的代码有关。检查代码中是否有任何header("location:...")命令以及它们是否可以循环(即重定向到再次重定向到重定向到页面的页面的页面)。

它也可以是.htaccess文件(或Apache配置),其中包含带有[R]参数的mod_rewrite指令,从而创建无限循环。

相关问题