💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
会话的支持在 PHP 默认为激活 PHP 的 Windows 版本已内建对此扩展的支持。不需要载入额外的扩展来使用这些函数 * [预定义常量](https://www.php.net/manual/zh/session.constants.php) * [范例](https://www.php.net/manual/zh/session.examples.php) * [基本用法](https://www.php.net/manual/zh/session.examples.basic.php) * [传送会话ID](https://www.php.net/manual/zh/session.idpassing.php) * [自定义会话管理器](https://www.php.net/manual/zh/session.customhandler.php) * [Session 上传进度](https://www.php.net/manual/zh/session.upload-progress.php) * [会话和安全](https://www.php.net/manual/zh/session.security.php) * [会话管理基础](https://www.php.net/manual/zh/features.session.security.management.php) * [和会话安全相关的配置项](https://www.php.net/manual/zh/session.security.ini.php) * [Session 函数](https://www.php.net/manual/zh/ref.session.php) * [session\_abort](https://www.php.net/manual/zh/function.session-abort.php)— Discard session array changes and finish session * [session\_cache\_expire](https://www.php.net/manual/zh/function.session-cache-expire.php)— 返回当前缓存的到期时间 * [session\_cache\_limiter](https://www.php.net/manual/zh/function.session-cache-limiter.php)— 读取/设置缓存限制器 * [session\_commit](https://www.php.net/manual/zh/function.session-commit.php)— session\_write\_close 的别名 * [session\_create\_id](https://www.php.net/manual/zh/function.session-create-id.php)— Create new session id * [session\_decode](https://www.php.net/manual/zh/function.session-decode.php)— 解码会话数据 * [session\_destroy](https://www.php.net/manual/zh/function.session-destroy.php)— 销毁一个会话中的全部数据 * [session\_encode](https://www.php.net/manual/zh/function.session-encode.php)— 将当前会话数据编码为一个字符串 * [session\_gc](https://www.php.net/manual/zh/function.session-gc.php)— Perform session data garbage collection * [session\_get\_cookie\_params](https://www.php.net/manual/zh/function.session-get-cookie-params.php)— 获取会话 cookie 参数 * [session\_id](https://www.php.net/manual/zh/function.session-id.php)— 获取/设置当前会话 ID * [session\_is\_registered](https://www.php.net/manual/zh/function.session-is-registered.php)— 检查变量是否在会话中已经注册 * [session\_module\_name](https://www.php.net/manual/zh/function.session-module-name.php)— 获取/设置会话模块名称 * [session\_name](https://www.php.net/manual/zh/function.session-name.php)— 读取/设置会话名称 * [session\_regenerate\_id](https://www.php.net/manual/zh/function.session-regenerate-id.php)— 使用新生成的会话 ID 更新现有会话 ID * [session\_register\_shutdown](https://www.php.net/manual/zh/function.session-register-shutdown.php)— 关闭会话 * [session\_register](https://www.php.net/manual/zh/function.session-register.php)— Register one or more global variables with the current session * [session\_reset](https://www.php.net/manual/zh/function.session-reset.php)— Re-initialize session array with original values * [session\_save\_path](https://www.php.net/manual/zh/function.session-save-path.php)— 读取/设置当前会话的保存路径 * [session\_set\_cookie\_params](https://www.php.net/manual/zh/function.session-set-cookie-params.php)— 设置会话 cookie 参数 * [session\_set\_save\_handler](https://www.php.net/manual/zh/function.session-set-save-handler.php)— 设置用户自定义会话存储函数 * [session\_start](https://www.php.net/manual/zh/function.session-start.php)— 启动新会话或者重用现有会话 * [session\_status](https://www.php.net/manual/zh/function.session-status.php)— 返回当前会话状态 * [session\_unregister](https://www.php.net/manual/zh/function.session-unregister.php)— Unregister a global variable from the current session * [session\_unset](https://www.php.net/manual/zh/function.session-unset.php)— 释放所有的会话变量 * [session\_write\_close](https://www.php.net/manual/zh/function.session-write-close.php)— Write session data and end session * [SessionHandler](https://www.php.net/manual/zh/class.sessionhandler.php)— The SessionHandler class * [SessionHandler::close](https://www.php.net/manual/zh/sessionhandler.close.php)— Close the session * [SessionHandler::create\_sid](https://www.php.net/manual/zh/sessionhandler.create-sid.php)— Return a new session ID * [SessionHandler::destroy](https://www.php.net/manual/zh/sessionhandler.destroy.php)— Destroy a session * [SessionHandler::gc](https://www.php.net/manual/zh/sessionhandler.gc.php)— Cleanup old sessions * [SessionHandler::open](https://www.php.net/manual/zh/sessionhandler.open.php)— Initialize session * [SessionHandler::read](https://www.php.net/manual/zh/sessionhandler.read.php)— Read session data * [SessionHandler::write](https://www.php.net/manual/zh/sessionhandler.write.php)— Write session data * [SessionHandlerInterface](https://www.php.net/manual/zh/class.sessionhandlerinterface.php)— The SessionHandlerInterface class * [SessionHandlerInterface::close](https://www.php.net/manual/zh/sessionhandlerinterface.close.php)— Close the session * [SessionHandlerInterface::destroy](https://www.php.net/manual/zh/sessionhandlerinterface.destroy.php)— Destroy a session * [SessionHandlerInterface::gc](https://www.php.net/manual/zh/sessionhandlerinterface.gc.php)— Cleanup old sessions * [SessionHandlerInterface::open](https://www.php.net/manual/zh/sessionhandlerinterface.open.php)— Initialize session * [SessionHandlerInterface::read](https://www.php.net/manual/zh/sessionhandlerinterface.read.php)— Read session data * [SessionHandlerInterface::write](https://www.php.net/manual/zh/sessionhandlerinterface.write.php)— Write session data