mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
62 lines
2.7 KiB
HTML
62 lines
2.7 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>将当前会话数据编码为一个字符串</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.session-encode" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">session_encode</h1>
|
|
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">session_encode</span> — <span class="dc-title">将当前会话数据编码为一个字符串</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.session-encode-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>session_encode</strong></span>
|
|
( <span class="methodparam">void</span>
|
|
) : <span class="type">string</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
<span class="function"><strong>session_encode()</strong></span>
|
|
返回一个序列化后的字符串,包含被编码的、储存于 $_SESSION 超全局变量中的当前会话数据。
|
|
</p>
|
|
<p class="para">
|
|
请注意,序列方法 和 <span class="function"><a href="serialize.html" class="function">serialize()</a></span> 是不一样的。
|
|
该序列方法是内置于 PHP 的,能够通过设置 <a href="session.configuration.html#ini.session.serialize-handler" class="link">session.serialize_handler</a> 来设置。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.session-encode-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
返回当前会话编码后的内容。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 notes" id="refsect1-function.session-encode-notes">
|
|
<h3 class="title">注释</h3>
|
|
<div class="warning"><strong class="warning">Warning</strong>
|
|
<p class="para">
|
|
在调用 <span class="function"><a href="session_decode.html" class="function">session_decode()</a></span> 之前必须先调用 <span class="function"><a href="session_start.html" class="function">session_start()</a></span>。
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.session-encode-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="session_decode.html" class="function" rel="rdfs-seeAlso">session_decode()</a> - 解码会话数据</span></li>
|
|
<li class="member"><a href="session.configuration.html#ini.session.serialize-handler" class="link">session.serialize_handler</a></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |