$ _SESSION似乎只是部分时间用于我的网站 [英] $_SESSION only seems to work part of the time for my site

查看:51
本文介绍了$ _SESSION似乎只是部分时间用于我的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创造了一款名为Mystic Crusade(www.mysticcrusade.com)的游戏,除了一件事情之外它往往工作得很好,有时它没有注册会议,我想。出于某种原因,我的一些用户在登录之前必须多次登录才能停留。这就是我的意思...


大多数用户登录并将他们带到他们的家。页面,然后他们可以四处移动并在游戏中做一些事情。


但是有些用户登录后,会将他们带到他们的家。页面(您必须登录才能看到),但当他们试图在页面中移动时,就好像他们没有记录它一样。如果您没有登录,它会让您离开游戏,您必须再次登录。这些用户将一次又一次登录,最终会有效。这个问题从来没有影响过我,但每次都会影响一些用户。


我使用$ _SESSION注册用户,它通过

[php] header(''Location)将它们带到''home'页面:home.php'');


退出; [/ php]


我每次都开始会话带有session_start()的页面;


请帮助我,我只是不明白为什么它似乎只在某些时候工作

I created a game called Mystic Crusade (www.mysticcrusade.com) and it tends to work perfectly except for one thing, sometimes it doesn''t register the session, i guess. For some reason, some of my users have to log in several times before they are logged in to stay. This is what I mean...

Most users log in and it takes them to their "home" page, then they can move around and do stuff in the game.

But some users log in, it takes them to their "home" page (which you have to be logged in to see) but when they try to move around the page, it''s like as if they were not logged it. If you are not logged in, it kicks you off the game and you have to sign in again. These users will sign in again and again and it will eventually work. This problem has never affected me, but it does effect some users every time.

I use $_SESSION to register the user, the it takes them to their ''home'' page via
[php] header(''Location: home.php'');


exit;[/php]

and I do start the session on every page with session_start();

Please help me, I just don''t understand why it seems to work only some of the time

推荐答案

_SESSION注册用户,它通过

[php] header(''Location:home.php'')将它们带到''home'页面;



退出; [/ php]


我在每个页面上用session_start()开始会话;


请帮助我,我只是不明白为什么它似乎只在某些时候工作
_SESSION to register the user, the it takes them to their ''home'' page via
[php] header(''Location: home.php'');


exit;[/php]

and I do start the session on every page with session_start();

Please help me, I just don''t understand why it seems to work only some of the time


这个问题可能更多与如何你正在摧毁你的会话。

告诉我,你用什么方法来保存sessio n id?
This problem may have more to do with how you are destroying your sessions.
Tell me, what method are you using for keeping the session id?



此问题可能与您如何销毁会话有关。

Tell我,你用什么方法来保持会话ID?
This problem may have more to do with how you are destroying your sessions.
Tell me, what method are you using for keeping the session id?



对不起,你什么意思?我假设你使用

I''m sorry, what do you mean? I assume that when you use


这篇关于$ _SESSION似乎只是部分时间用于我的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆