After a session is used for many times, the following prompt is displayed,Warning: session_start () [function. session-start]: Cannot send session cookie-headers already sent by (output started at/home/u114264/include/db_mysql tutorial. class. php
Warning cannot send session cookie-headers already sent ... Problem Resolution (PHP UTF-8 BOM citation
Accustomed to using Edit plus PHP programming, so sometimes there are some unknown errors, very troublesome;
Recently, when developing a project,
Method
Information size
Save time
Application scope
Save location
Application
Any size
Lifetime of the entire application
All Users
Server-side
Session
Small, simple data
Created on May 3, 2017Lesson 1th: Introduction to work on the previous sectionPut the mouse on the form and enter the editing mode------Learn----cmdbModal dialog box---Popup dialog---------to the backgroundWay:1 form-full refresh with Submit page2
These objects are used to hold information, including user information, passing value information, global information, and so on. Here are the main differences between them:1.Application objectsApplication is used to hold public data information for
1. Request-Gets the requested objectstring s =request["key"];2. Response-Response Request ObjectResponse.Redirect ("url"); Service End multiplicity orientation, jump on the current page.Response.Write ("string"); Output this string to the top of the
Directory1. Preface2, JS front-end use session to save tokens3, JS front-end use cookies to save tokens4. JS front end use angular cookie to save tokenContent1. PrefaceWhen the front-end API interface is requested for security purposes, it is
As long as you have written PHP code, I believe you have encountered this most of the time is not warning it. We're going to take care of it today .....
Read the PHP manual, the answer is as follows:
Message "Warning:cannot send session
Session Start
Session_Start (); To start a session, if you want to use the sessions program, you must add this sentence to the front
$_session[' user_id '] = ' 123′;//assigns a value to a session variable that is created if the variable does not
The browser's caching mechanism provides a way to store user data on the client, using Cookie,session to interact with the server.
First, cookies and session
Cookies and sessions are the conversational ways used to track the identity of a browser
I. Introduction of cookies and sessionCookies are not part of the HTTP protocol, and because the HTTP protocol is not able to maintain state, we need to "keep state" in reality, so cookies are born in such a scenario.A cookie works by creating
A. Cookies
Cookies, sometimes in their plural form, are the data (usually encrypted) stored on the user's local terminal by certain websites in order to identify the user and track the session.
1. Application
The server can use cookies to
The difference between cookie mechanism and session mechanism*************************************************************************************Specifically, the cookie mechanism is a scheme for maintaining state on the client side, and the
COOKIE and Session Introduction1, the cookie does not belong to the HTTP protocol scope, because the HTTP protocol cannot maintain the state, but actually, we need to "maintain the state", therefore the cookie is born in such a scene.A cookie works
Source of the problem: what is cross-domain session/cookie across domains.
Which is the third party Session/cookie. The first party Session/cookie refers to the Seesion/cookie of the browser settings that visitors currently visit to the Web site,
A. CookiesA cookie is a set of data that is stored on a client and is used primarily to hold personal information about a user, primarily to store requests for information that the browser requests from the server, which are non-sensitive
Turn from: Click to open the link
The difference between cookie mechanism and session mechanismSpecifically, the cookie mechanism is a scheme for maintaining state on the client side, and the session mechanism uses the scheme of maintaining state
This article mainly introduces PHP Session control: Session and Cookie Details. This article describes Session and Cookie related knowledge in PHP in detail and covers a wide range of topics, for more information about PHP session control, see the
This article introduced the PHP session control, mainly elaborated the following several things:
• Background/concept of Session controlMaintenance and life cycle of • Cookies (effective time)Maintenance and life cycle of session (recovery
, cookie mechanism and the difference between the session mechanism
*************************************************************************************
Specifically, the cookie mechanism is a scheme for maintaining state on the client side, and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.