一款经过生产环境检验(日 PV 十亿级)的轻量级 PHP 框架,v1.0.1 版本,高性能毫秒级响应。
# 支持 Web 和 Console 两种模式,单文件入口,自动识别 Web / CLI 环境
php index.php支持 Console 环境下的 Daemon 守护进程模式(主要适用于 Linux CentOS 7):
# 实现经典的 Master-Worker 模式
php index.php --id=tinyphp-daemon --daemon=start
# 可扩展为 TCP 服务端程序、定时器、IO 异步事件驱动等,365x24 稳定运行支持一键打包成单文件可执行程序:
# 编译
php index.php --build
# 运行生成的 phar 单文件程序
php tinyphp-demo.phargit clone https://github.com/aigmlab/tinyphp.git
cd tinyphp
# 兼容 Composer 安装
composer install aigm/tinyphp-framework-1.0 @dev
# 直接 Git 下载
mkdir lib/ && cd lib
git clone https://github.com/aigmlab/tinyphp.git
# 运行
php index.php
# 编译
php index.php --build
# 开启守护进程
php index.php -d
# 编辑配置文件
vi application/config/profile.phpLinux (CentOS 7 X64) + OpenResty (Nginx) + MySQL + PHP + Redis 一键安装包。
项目地址: https://github.com/aigmlab/lnmp-utils
git clone https://github.com/aigmlab/lnmp-utils.git
cd ./lnmp-utils
./install.sh -m lnmp
curl http://127.0.0.1A production-tested (1+ billion daily PV), lightweight PHP framework — v1.0.1, high-performance with millisecond response times.
# Supports both Web and Console modes via a single entry point
php index.phpDaemon mode for Console environments (primarily Linux CentOS 7):
# Classic Master-Worker pattern
php index.php --id=tinyphp-daemon --daemon=start
# Extensible to TCP servers, timers, async IO event-driven modes — 365x24 stableSingle-file executable packaging:
# Build
php index.php --build
# Run the generated phar executable
php tinyphp-demo.phargit clone https://github.com/aigmlab/tinyphp.git
cd tinyphp
# Composer install
composer install aigm/tinyphp-framework-1.0 @dev
# Or direct Git clone
mkdir lib/ && cd lib
git clone https://github.com/aigmlab/tinyphp.git
# Run
php index.php
# Build
php index.php --build
# Start daemon
php index.php -d
# Edit config
vi application/config/profile.phpLinux (CentOS 7 X64) + OpenResty (Nginx) + MySQL + PHP + Redis one-click installer.
Repository: https://github.com/aigmlab/lnmp-utils
git clone https://github.com/aigmlab/lnmp-utils.git
cd ./lnmp-utils
./install.sh -m lnmp
curl http://127.0.0.1The framework includes comprehensive documentation covering:
- PHP coding standards (file structure, formatting, naming, expressions, constants, function design)
- SQL usage guidelines (query standards, table/database conventions, design and optimization principles)
- Framework manual and getting-started guide
See the 中文 section above for the complete document index.