Home  >  Article  >  Backend Development  >  Recommended 8 articles about session mechanism

Recommended 8 articles about session mechanism

黄舟
黄舟Original
2017-06-15 13:58:091165browse

Session mechanism (Session) is used in PHP to save some data in concurrent access. This can help create more user-friendly programs and increase the appeal of your site. A visitor to your web site will be assigned a unique ID, the so-called session ID. This ID can be stored in a cookie on the user side or passed through the URL. Session support allows you to save data in the request in the superglobal array $_SESSION. When a visitor visits your site, PHP will check automatically (if session.auto_start is set to 1) or at your request (explicitly via session_start() or implicitly via session_register() ) whether the current session id was created by a previously sent request. If this is the case, then the previously saved environment will be rebuilt. $_SESSION (and all registered variables) will be used by PHP using the built-in serialization methods on request completion. Serialization. Serialization method

1. PHP Features Session Mechanism 2——Session and its use

Recommended 8 articles about session mechanism

Introduction: Session mechanism (Session) is used in PHP to save some data in concurrent access. This can help create more user-friendly programs and increase the appeal of your site.

2. PHP Features Session Mechanism 1—Use of Cookies

Recommended 8 articles about session mechanism

Introduction: PHP transparently supports HTTP cookies. A cookie is a mechanism that stores data on a remote browser to track and identify users. Cookies can be set using the setcookie() or setrawcookie() functions.

3. php—Use of Cookies

Recommended 8 articles about session mechanism

##Introduction: Session mechanism of PHP characteristics—Use of Cookie

4. php--Session and its use

Recommended 8 articles about session mechanism

Introduction: Session mechanism of PHP features—Session and its use

5. In-depth understanding of browsers Session mechanism (session && cookie) Clear cookie cookie Download cookie note

Introduction: Session, cookie: In-depth understanding of browser session mechanism (session && cookie): For a front-end development I think everyone is familiar with cookies. They often encapsulate some methods such as setcookie and getcookie. Session is like the most familiar stranger. We will use it when we cooperate with back-end developers on projects, but not To understand its essence, let’s discuss the cookie storage location in detail: stored on the client. Function: This domain stores data across pages (we seem to generally use username, passward). Cookies generally contain information as shown below: Transmission: Next

6. Problems related to the session mechanism in php

Introduction: Issues related to the session mechanism in php

7. Issues related to the session mechanism in php

Introduction: Thinking about issues related to the session mechanism in php? 1. After the client disables cookies, can it still access SESSION? By default, the session in PHP uses the client's cookie to save the session id, so when there is a problem with the client's cookie, it will affect the session. But Session does not completely rely on Cookie. It can also pass session id through URL Get. This requires you to

8. Is the php session safe? How to build a secure session mechanism?

Introduction: After studying session security for a few days, I came up with a few opinions. Please correct me: You can obtain cookie information, including sessionid, through xss. You can obtain header information, including sessionid, by intercepting http. Both of the above methods are available. Certain conditions and difficulties. If the server relies solely on sessionid to identify session information...

[Related Q&A recommendations]:

Is php session safe? ? How to build a secure session mechanism?

The above is the detailed content of Recommended 8 articles about session mechanism. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn