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

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

WBOY
Release: 2016-06-23 13:41:59
Original
1054 people have browsed it

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

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



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


回复讨论(解决方案)

自己找到答案了.  setrawcookie函数


$str= 'Ave0fd\fdd';

setrawcookie("user", $str);

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template