PHPackages                             jiosen/lib - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jiosen/lib

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jiosen/lib
==========

frequently-used

v1.0.0(2y ago)07PHPPHP ^7.0

Since Jun 7Pushed 2y agoCompare

[ Source](https://github.com/tyjiosen/lib)[ Packagist](https://packagist.org/packages/jiosen/lib)[ RSS](/packages/jiosen-lib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

安装
--

[](#安装)

```
composer require jiosen/lib
```

使用
--

[](#使用)

```
include './vendor/autoload.php';

use Jiosen\Lib\Captcha;
use Jiosen\Lib\Cache;
use Jiosen\Lib\Db;
use Jiosen\Lib\Http;
use Jiosen\Lib\Request;
use Jiosen\Lib\Upload;
use Jiosen\Lib\Validate;

//验证码
$captcha = new Captcha();
$captcha->show($id);

//缓存
$cahce = Cache(dirname(__FILE__) . '/cache/');
dump($cache->set('name111',['s'=>11]));
dump($cache->get('name'));
dump(cache()->set('age',10));

//数据库
$mod = new Db(['dbname'=>'jtest','prefix'=>'j_']);
dump($mod->name('tablename')->find());
dump($mod->table('tablename')->order('id desc')->limit(10)->select());

//上传文件

try {
    $files = Upload::file(dirname(__FILE__) . '/cache/file','music,file',['fileExt'=>'txt,mp3,webp']);
    dump($files);
} catch (\Exception $e) {
    echo $e->getMessage();
}

//请求

dump(Request::getInstance()->param(),Request::getInstance()->isMobile());

dump(request()->param('id',0,'intval'));

//验证

dump(Validate::ip('127.0.0.1','ipv6'),Validate::ip('127.0.0.1'));
dump(Validate::email('4631458@qq.com'));

更多例子看 test/index.php
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1076d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/10688a357c7bf733de0f4b50ae385ad417bc47da4f8186359e73b19f963eeb0b?d=identicon)[tyjiosen](/maintainers/tyjiosen)

### Embed Badge

![Health badge](/badges/jiosen-lib/health.svg)

```
[![Health](https://phpackages.com/badges/jiosen-lib/health.svg)](https://phpackages.com/packages/jiosen-lib)
```

###  Alternatives

[jameslkingsley/laravel-references

Drop-in model references.

131.7k](/packages/jameslkingsley-laravel-references)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
