简体   繁体   English

从较低的文件夹无法访问php会​​话数据

[英]php session data inaccessible from lower folder

I am setting a session variable from .../folder/script.php when i try to access it from .../script.php i get nothing 当我尝试从... / script.php访问它时,我正在从... / folder / script.php设置会话变量,我一无所获

its probably something stupid but...can anyone explain? 这可能是愚蠢的,但是...有人可以解释吗? and yes i am starting the session. 是的,我正在开始会议。 and i am using an overriden session if that helps any ? 我正在使用重写会话,如果有帮助吗?

You may be setting a cookie with a path. 您可能正在设置带有路径的Cookie。

Try setting the cookie path to /, 尝试将Cookie路径设置为/,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PHP-在其他页面上无法访问会话 - PHP - Session inaccessible on other pages 是否应该将处理/验证由AJAX调用的数据的PHP文件放在“ include”文件夹中,并使用户无法访问? - Should the PHP files that do processing/validation of data called by AJAX be put in 'include' folder and made inaccessible to the user? 显示来自PHP会话的数据 - Displaying Data from Php Session PHP会话在不同的文件夹 - PHP Session in different folder PHP从JSON低层数组中检索数据 - PHP retrieving data from JSON lower levels in an array 新主机-Php会话数据正在保存到指定的文件夹,但是会话变量为空/不读取数据? - New Host - Php session data being saved to specified folder, but session variables are blank/not reading the data? 如果 php session 存在,则从 .htaccess 锁定文件夹下载文件 - If php session exists, then download file a file from .htaccess locked folder 使用 session 和 PHP 显示文件夹中的随机图像 - Display a random image from the folder using session with PHP 如何在Wordpress PHP代码中使用父文件夹中的会话变量 - How to use session variable from parent folder in a wordpress php code 如何在PHP的文件夹目录中放置会话的用户名? - How do I put a username from session in folder directory in PHP?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM