English 中文(简体)
何时开始会议?
原标题:When to start a session?
  • 时间:2011-10-25 09:40:31
  •  标签:
  • php
  • session

我有一个系统,要求用户在能够进入其会员仪表板之前对账户进行记录(或登记)。

我的问题是,......在什么时候,我的会议开始? 标识页和登记页? 或者在用户成功认证之后?

感谢。

问题回答

您需要在每一页加上<代码>session_start(start),希望会议数据能够查取。 在完成任何其它产出之前,还需要呼吁这样做。

正如Helge Helwig所说的那样,

you need to add session_start() in the top of every page. However, to make this easier, you can create a PHP document, where you store all vital code like this, and call it; say init.php.

Then you can include init.php at the top of every page, which would clean up the code a bit.

开始在网页上举行会议,需要查阅会议数据。 作为成功标识的一部分,你还应打电话session_regenerate_id,以防止会议固定。

you can start session once user is authenticated. after that you can user related information in S_SESSION and access this info from anywhere.

在核实用户信息之后,你应首先开会,而你可以确定用户为会议变量。 之后,这可能有助于装上用户的个人信息,如简介、参考等。

在登记页上,我想你不需要开课。

关于

页: 1 您将把标识和登记页的数值作为认证用户。 但是,一旦用户得到核实,现在你们必须把这一功能放在需要用户认证的所有网页上。





相关问题
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 ...

热门标签