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...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn