[Ask] I have some questions about session in php. I can see the usage of phpsession on the Internet. 1. phpsession_start (); $ _ SESSION ['passwd'] = & quot; mynameislikui & quot; 2. phpsession_start (); echo $ [ask] some questions about the session in php
I can see php session usage on the Internet.
1. php
Session_start ();
$ _ SESSION ['passwd'] = "mynameislikui ";
I can use a browser to jump from 1. php to 2. php. However, it is a problem that I use a client to write an httprequest.
My test is like this. when I access the response returned by 1. php, I find that there are more http headers.
PHPSESSID = maid
This value is added to the header of the request to access 2. php. But no result is returned.
I don't know if this method is correct, but I feel that the browser has not done anything special, why can it be displayed normally?
I don't know if I have clarified the problem? Please contact us
------ Solution --------------------
What do you want to do? Learning the usage of session in php?
$ _ SESSION ['passwd'] = "mynameislikui ";
Yes, it should be
$ _ SESSION ['passwd'] = "mynameislikui ";
------ Solution --------------------
Yes.
You can use the program to get the response header, and then write this information in the header the next time you send it.
Note that sesssionid stores cookies, which are also constructed in cookies during sending.
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.