mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-17 21:16:57 +08:00
97 lines
3.6 KiB
HTML
97 lines
3.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>发送未经 URL 编码的 cookie</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.setrawcookie" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">setrawcookie</h1>
|
||
<p class="verinfo">(PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">setrawcookie</span> — <span class="dc-title">发送未经 URL 编码的 cookie</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.setrawcookie-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>setrawcookie</strong></span>
|
||
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
|
||
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
|
||
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$expire</code><span class="initializer"> = 0</span></span>
|
||
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span>
|
||
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$domain</code></span>
|
||
[, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$secure</code><span class="initializer"> = false</span></span>
|
||
[, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$httponly</code><span class="initializer"> = false</span></span>
|
||
]]]]]] ) : <span class="type">bool</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
<span class="function"><strong>setrawcookie()</strong></span> 和
|
||
<span class="function"><a href="setcookie.html" class="function">setcookie()</a></span> 非常相似,唯一不同之处是发送到浏览器的 cookie 值没有自动经过 URL 编码(urlencode)。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.setrawcookie-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<p class="para">
|
||
相关参数的信息参见 <span class="function"><a href="setcookie.html" class="function">setcookie()</a></span> 的文档。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.setrawcookie-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
成功时返回 <strong><code>TRUE</code></strong>, 或者在失败时返回 <strong><code>FALSE</code></strong>。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 changelog" id="refsect1-function.setrawcookie-changelog">
|
||
<h3 class="title">更新日志</h3>
|
||
<p class="para">
|
||
<table class="doctable informaltable">
|
||
|
||
<thead>
|
||
<tr>
|
||
<th>版本</th>
|
||
<th>说明</th>
|
||
</tr>
|
||
|
||
</thead>
|
||
|
||
<tbody class="tbody">
|
||
<tr>
|
||
<td>5.5.0</td>
|
||
<td>
|
||
发送给客户端的 Set-Cookie 头现在会加上 Max-Age 属性。
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>5.2.0</td>
|
||
<td>
|
||
增加了 <code class="parameter">httponly</code> 参数。
|
||
</td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
|
||
</table>
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 seealso" id="refsect1-function.setrawcookie-seealso">
|
||
<h3 class="title">参见</h3>
|
||
<p class="para">
|
||
<ul class="simplelist">
|
||
<li class="member"><span class="function"><a href="setcookie.html" class="function" rel="rdfs-seeAlso">setcookie()</a> - 发送 Cookie</span></li>
|
||
</ul>
|
||
</p>
|
||
</div>
|
||
|
||
|
||
</div></div></div></body></html> |