madeorsk / session
PHP中的简单会话处理。
1.0
2020-05-26 10:04 UTC
Requires
- php: >= 7.0
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-09-26 20:22:55 UTC
README
PHP中的简单会话处理。
快速开始
use Session\Session; // Initialize session. $session = new Session(); $session->write("name", "this is a text value"); // Save "this is a text value" in the session. // ... echo $session->read("name"); // Will echo "this is a text value". echo $session->read("undefined_name", "my default value"); // Will echo "my default value". // ... $value = $session->delete("name"); // Delete the value of the session variable "name" in the session and return it.
完整文档
完整的API文档目前正在制作中。您仍可以在源代码中查看不同方法的完整文档。