Home >Backend Development >PHP Tutorial >Analysis of possible reasons why PHP cannot read Cookies
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.