1
0
mirror of https://github.com/php/doc-zh.git synced 2026-04-24 16:48:17 +02:00
Files
魔王卷子 8c2ec3127d Update session 1 (#640)
* Update book.xml

* Update constants.xml

* Update examples.xml

* Update security.xml

* Update upload-progress.xml

* Update session-cache-expire.xml

* Update session-cache-limiter.xml

* Update session-destroy.xml

* Update session-encode.xml

* Update session-get-cookie-params.xml

* Update session-id.xml

* Update session-name.xml

* Update session-regenerate-id.xml

* Update session-save-path.xml

* Update session-set-cookie-params.xml

* Update session-set-save-handler.xml

* Update session-start.xml

* Update session-start.xml

* Update session-status.xml

* Update session-unset.xml

* Update book.xml

* Update session-cache-expire.xml

* Update session-unset.xml
2023-02-15 00:22:37 +08:00

80 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 35b95a56ccc03b66af7117fc815ac7881e2e0ad3 Maintainer: yincheng Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.session-encode" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>session_encode</refname>
<refpurpose>将当前会话数据编码为字符串</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>session_encode</methodname>
<void/>
</methodsynopsis>
<para>
<function>session_encode</function>
返回一个序列化后的字符串,包含被编码的、储存于 $_SESSION 超全局变量中的当前会话数据。
</para>
<para>
默认情况下,PHP 内部使用的序列方法和 <function>serialize</function> 是不一样的。
该序列方法通过 <link linkend="ini.session.serialize-handler">session.serialize_handler</link> 来设置。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
返回当前会话编码后的内容,&return.falseforfailure;
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<warning>
<para>
在调用 <function>session_encode</function> 之前必须先调用 <function>session_start</function>
</para>
</warning>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>session_decode</function></member>
<member><link linkend="ini.session.serialize-handler">session.serialize_handler</link></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->