English 中文(简体)
1. 维持一个PHP会议——与厨师开始
原标题:Maintain a PHP session_start() with cookies

我有一套使用<条码>的会议代码(<>/条码>)。 确实,在用户被贴上标签后,将用户引向简介.php,显示用户信息。 但是,当用户重载该网页时,本届会议就已经结束。 比如,我是否能够维持一个小时? 我曾尝试过厨师,但我不知道如何告诉购买力平价,会议已经开始。 感谢!

Profile.php code for cookies and session start:

if(isset($HTTP_COOKIE_VARS[ session ])){ 
     session_start();
} else {
    header( Location: index.php );
}

代码:

session_start();

$_SESSION[ pass ]  = $password;
header( Location: ../profile.php );
setcookie("session","1",time()+3600,"/");

检查法律:

if($_SESSION[ pass ] == $tableArray[0][ password ]) {
    $username = $tableArray[0][ name ];
    $avatar = $tableArray[0][ avatar ];
} else {
    header( Location: index.php );
}

我在这里召集会议:

<li><a href=<?php session_destroy(); echo "index.php"?>>Logout</a></li>

而 forgot PHP在超文本之前运行:P 问题!

最佳回答
  • you re not calling session_start() again or
  • you re calling session_destroy(); anywhere in file
问题回答

技术性发言 我找到了解决办法。

一条已经具体规定的改动是,除非改变路线,否则就会改变贵会议存放地名录的许可。

我为我工作了。

如果贵届会在届会休会后举行,那么:

chmod 777 session/

Try to set session.use_cookies to be on (in php.ini/.htaccess)

您必须在上说session_start(start),上面注明需要了解届会数据。

本届会议的表象确实不是你的关切,你应考虑“执行细节”。 (在浏览器离开之前,厨师通常居住在用户浏览器中。)

我怀疑你没有在<条码>上打上<条码>_start(<>>>>>>。

您必须打上每个能够获取会议数据的文字的<代码>session_start()。

www.un.org/Depts/DGACM/index_french.htm 之后的代码

不要检查会议的存在,而是做如下事情:

// Start the session first
session_start();
if (isset($_SESSION[ username ])) {
  // user is already logged in
} else {
    header( Location: index.php );
}




相关问题
why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? ...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

Can I get the size of a Session object in bytes in c#?

Is it possible to get the size(in bytes) of a Session object after storing something such as a datatable inside it? I want to get the size of a particular Session object, such as Session["table1"], ...

提供严格分类的出席会议物体

提供严格分类的与会机会的最佳方式是什么? 我正计划转而选择矩阵,这正在促使汇编者抱怨我的幻觉方案拟订方法......

PHP Session is not destroying after user logout

I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within ...

热门标签