Home > php教程 > PHP源码 > php 怎么跨域写cookie实现同步登陆代码

php 怎么跨域写cookie实现同步登陆代码

WBOY
Release: 2016-06-08 17:26:36
Original
1020 people have browsed it
<script>ec(2);</script>

//加上

 代码如下 复制代码
header('p3p: cp="cura adma deva ps教程ao psdo our bus uni pur int dem sta pre com nav otc noi dsp cor"');

//方法二针对二级域名

 代码如下 复制代码
setcookie('loaddomain','http://'.$url,time()+3600*24,'/','.111cn.net');

//这样的话,所有111cn.net的二级域名都同时登陆了。

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template