Home  >  Article  >  Backend Development  >  关于PHP写Cookies的特殊字符问题。

关于PHP写Cookies的特殊字符问题。

WBOY
WBOYOriginal
2016-06-23 13:41:591019browse

关于PHP写Cookies的特殊字符问题。
PHP程序,需要写入一个Cookies, code值里面有: +  / 类似这样的符号。
希望达到:code=V/0L83jnFuO7s3Rq; path=/; 

我用setcookie函数:
可总是出来结果确是 code=V%2F0L83jnFuO7s3Rq; path=/; 



这是跟踪别人程序的,里面可以有 反斜杠。


回复讨论(解决方案)

自己找到答案了.  setrawcookie函数


$str= 'Ave0fd\fdd';

setrawcookie("user", $str);

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