> >

The setcookie function of Re: PHP

time:15-05-25 forum:PHP tools and code
  PHP cookie setcookie uses the

session and cookie functions. In order to keep the user information permanently, cookie is the most convenient means. Here I will explain the function and use of.

1. Okie (string name, string value, int expire, string path, string domain, int), all of the parameters are optional. The empty string can be used to represent the value / > attribute used to refer to which directory path that is sent to the server. The property domain: can limit the.
expire parameter to the transmission of cookie at the browser side: to specify the valid time for cookie, it is a standard Unix time tag.
can be obtained by time () or mktime () function, in seconds as a.
secure parameter: indicate whether this cookie is on the network via the encrypted protocol. Transfer.

Two: the notice of setting cookie when setting up
cookie in the same page is actually done in the order from back to forward. If you want to delete a cookie and write a cookie first, you must write a write statement, then write a delete statement. No error.

Three: setcookie simple: setcookie (
  • 1
  • 2

prev:Comparison and analysis of JavaScript st... next:Analyze the process and principle of Dis...
post comments
Notice



Approved   How much do you know about the histo...   The inheritance of the old Ji'nan ha...   Do not belittle those street cars, t...   South Korea's chief mother is popula...   The 3 year old was elected the young...
rand   Does the check directory exist and t...   PHP filter replacement output digita...   PHP uses $_GET to get processing cod...   Fourteen experiences in programming ...   Using JSON to implement cross domain...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com