gpt4 book ai didi

lighttpd - 为什么 PHP session 被破坏?

转载 作者:可可西里 更新时间:2023-10-31 22:56:32 24 4
gpt4 key购买 nike

我有这个 php 代码,

<?php

session_start();
Print_r($_SESSION);
$_SESSION['value'] = 1;
Print_r($_SESSION);

?>

为什么每次刷新页面都会打印如下内容..

Array
(
)
Array
(
[value] => 1
)

它应该打印,

Array
(
[value] => 1
)
Array
(
[value] => 1
)

我在 Fedora 14 上使用 lighttpd 作为 http 服务器。

最佳答案

我读到运行 chown -R root:lighttpd/var/lib/php/ 为遇到相同问题的其他人解决了这个问题。

来源:
http://masdeni.com/archives/6-Lighttpd-+-PHP-Session-Problem.html

关于lighttpd - 为什么 PHP session 被破坏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14079769/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com