Home >Backend Development >PHP Tutorial >Analysis of possible reasons why PHP cannot read Cookies

Analysis of possible reasons why PHP cannot read Cookies

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 09:06:531444browse

Phenomena:

The server cannot read the Cookies information previously written to the client.

PHP writes the Session Id to the client's Cookies. As a result, every time a request is made, the request header does not bring the Cookies information.

Analysis:

It may be because there may be a problem with the domain setting.

After checking the domain information of the cookies, in addition to the domain name, there is also port information. It is suspected that the browser thinks there is a security risk because of the port. Block the cookies on the client side. Not sent to the server.

It often appears on websites with port numbers. Set the domain to the domain name, and remove the port number and ":".

Retry: Passed.

The above has introduced the analysis of possible reasons why PHP cannot read Cookies, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

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