Page 1 of 1
Cookie in PHP
Posted: Tue Feb 07, 2012 12:50 am
by anp24
Hello,
If I create a Cookie in PHP with its path set to '/' (forward slash), then where it is stored . It is stored on client machine or in the Web server where all the web pages are stored?. Is the client machine user can access and change the cookie value.
Thanks
Regards
Re: Cookie in PHP
Posted: Tue Feb 07, 2012 5:45 am
by social_experiment
The cookie is stored on the client's computer; From the php manual: (related to the path argument accepted by setcookie())
The path on the server in which the cookie will be available on. If set to '/', the cookie will be available within the entire domain . If set to '/foo/', the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of domain . The default value is the current directory that the cookie is being set in.
If you want to know if the cookie information can be modified, then yes it can.
Re: Cookie in PHP
Posted: Tue Feb 07, 2012 11:06 pm
by anp24
Hello,
Can I create the cookie in PHP which is stored on the web server and not on the client computer
Thank You
Regards
Re: Cookie in PHP
Posted: Tue Feb 07, 2012 11:12 pm
by social_experiment