https://github.com/yakeing/php_session
This is a SESSION class function package, use more easily, just a few simple functions can use it.
https://github.com/yakeing/php_session
php-sessions session
Last synced: 6 months ago
JSON representation
This is a SESSION class function package, use more easily, just a few simple functions can use it.
- Host: GitHub
- URL: https://github.com/yakeing/php_session
- Owner: yakeing
- License: mpl-2.0
- Created: 2015-10-09T03:16:50.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2021-05-16T06:10:43.000Z (about 5 years ago)
- Last Synced: 2025-08-15T15:22:12.880Z (10 months ago)
- Topics: php-sessions, session
- Language: PHP
- Homepage:
- Size: 117 KB
- Stars: 51
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# SESSION
This is a SESSION class function package, use more easily, just a few simple functions can use it.
Session Functions [Table of Contents](https://www.php.net/manual/en/ref.session.php).
### Travis CI badge
[](https://travis-ci.com/yakeing/php_session)
### codecov badge
[](https://codecov.io/gh/yakeing/php_session)
### Github badge
[](../../)
[](src)
[](../../releases)
[](LICENSE)
[](../../search?l=php)
### Installation
Use [Composer](https://getcomposer.org) to install the library.
Of course, You can go to [Packagist](https://packagist.org/packages/yakeing/php_session) to view.
```
$ composer require yakeing/php_session
```
### session init
- [x] example
```php
$expire = 180; //Default server 180 minutes client end
$id = md5('uid'); //user ID, Default automatic generation
$name = "PHPSESSID";
$limiter = "private";
$handler = null;
$session = new session($expire, $id, $name, $limiter, $handler);
```
### FUNCTION
- [x] example
```php
$name = 'admin';
$value = 'pass';
$session->Set($name, $value); //Set up a session Value
$session->Get($name); //Get a session Value
$session->Delete($name); //Write off a session Value
$session->Unset(); //End all session Value
$session->Destroy(); //End all session Value
```
[Sponsor](https://github.com/yakeing/Documentation/blob/master/Sponsor/README.md)
---
If you've got value from any of the content which I have created, then I would very much appreciate your support by payment donate.
[](https://github.com/yakeing/Documentation/blob/master/Sponsor/README.md)
Author
---
weibo: [yakeing](https://weibo.com/yakeing)
twitter: [yakeing](https://twitter.com/yakeing)