PHPackages                             jpp/mintool - 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. jpp/mintool

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

jpp/mintool
===========

j project php mini tool

04PHP

Since Aug 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/vsfor/minphptool)[ Packagist](https://packagist.org/packages/jpp/mintool)[ RSS](/packages/jpp-mintool/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

#### mini tool by php

[](#mini-tool-by-php)

PHP简易工具包

Usage: `composer create-project jpp/mintool mpt dev-main`

##### 运行模式

[](#运行模式)

- 命令行脚本 `php mpt -r cmd/test/index -p "a=b&c=3"`
- php-fpm API `路由仅支持 小写字母、数字、中划线`
- phar 打包部署 `php -d phar.readonly=0 ./mpt -r phar/pack`

##### 基础功能集成

[](#基础功能集成)

- 动态加载配置文件 基于 `J_ENV`
- 日志 基于php `error_log`
- MySQL数据库连接及查询操作封装
- Redis连接基于php redis扩展 `https://pecl.php.net/package/redis`
- Excel 文件读写 `csv xls xlsx`
- Phar 打包，确认不使用phar打包时，可简化core/functions.php文件中的appBasePath方法

##### nginx php-fpm 配置样例

[](#nginx-php-fpm-配置样例)

- 普通模式(非phar打包部署)

```
server {
    listen 80;
    server_name mt.local.com;
    index index.php;
    root /data/www/mintool/web;

    if (!-e $request_filename) {
        rewrite ^(.*)$ /index.php/$1 last;
    }

    location ~ [^/]\.php(/|$) {
        #fastcgi_pass 127.0.0.1:9000;
        fastcgi_pass unix:/dev/shm/php-cgi.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
    }

    location ~ ^(.*)\/\.(git|svn|ht|project)\/  {
        deny all;
    }
    location /.well-known {
        allow all;
    }
    access_log off;
}

```

- phar 打包后使用nginx部署，可在创建`build/public/index.php`文件后参考普通模式配置

```
// index.php 样例代码
try {
    defined('J_DEBUG') or define('J_DEBUG', false);//是否调试模式
    defined('J_ENV') or define('J_ENV', 'prod'); //环境｜主机｜项目

    Phar::loadPhar(dirname(__DIR__) .'/mpt.phar','mpt');
    require_once 'phar://mpt/public/index.php';
} catch (\Throwable $e) {
    var_dump($e->getMessage());
}
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce8a95011e3cb27d651982861ce5a3232ad37a919bafd886ad726892fe88710f?d=identicon)[vsfor](/maintainers/vsfor)

---

Top Contributors

[![vsfor](https://avatars.githubusercontent.com/u/1228579?v=4)](https://github.com/vsfor "vsfor (12 commits)")

### Embed Badge

![Health badge](/badges/jpp-mintool/health.svg)

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

PHPackages © 2026

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