How to obtain the cookie set in php

Source: Internet
Author: User
In php, how does one obtain the cookie set under the same domain name? 1.asp& nbsp; write cookie: & nbsp; Response. cookies ("var") ("a") = "N" & nbsp; Response. how to obtain cookie sets in Cookies php
Under the same domain name,

1. asp writes cookie:
Response. Cookies ("var") ("a") = "N"
Response. Cookies ("var"). Domain = "domain.net"
2. how does one read the values of Cookies ("var") ("a") in php?

I am not familiar with php and do not know how to read the value of this cookie set? Share:
------ Solution --------------------
Print_r ($ _ COOKIE); // You can check what is available.
------ Solution --------------------
This post was last edited by xuzuning at 10:34:13. it will not be a problem, or I will not post the output result!

However, my code is only used in environments after php 5.3. if you are still using php 5.2, please rebuild it.

I have decided not to write backward compatible code. Only in this way can I reflect the advantage of php 5.4.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.