The code is given below:
Copy code The code is as follows:
The usage is like this
setmycookie('name'); This will set a cookie named name under the domain name
It is easier to read it with php.
Copy code The code is as follows:
$str = $_COOKIE('name'); //The parameters inside are the names set above
?>
Reprinted from 5D Happy Blog
Here are some related supplementary knowledge, in-depth friends can refer to it.
Javascript code for setting and reading cookies
Since we have not found a better collection of operating function codes for js cookies, you can refer to the next article for better content.
http://www.bkjia.com/PHPjc/321554.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321554.htmlTechArticleThe code is given below: Copy the code as follows: script language="JavaScript" type="text/javascript" function setmycookie (name) //Main parameters { $name = "thename"; $namev = test...