tinyphporg / tinyphp-framework-1.0
A framework for php
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 28
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >= 7.0.0
This package is auto-updated.
Last update: 2024-08-22 11:19:55 UTC
README
简介
一款经过生产环境检验(日PV10亿级)的轻量级PHP框架,此为1.0版本,高性能版本,毫秒级响应。
#支持Web和Console两种模式,单文件入口,自动识别web和cli环境,创建web下/console的application。
php index.php
支持Console环境下(主要适应于LINUX CENTOS 7)的Daemon守护进程模式。
#实现了经典的Master-Worker模式。 php index.php --id=tinyphp-daemon --daemon=start #可扩展为TCP服务端程序,定时器,IO异步事件驱动等模式,能够365xx24稳定运行。
支持一键打包成单文件可执行程序。
#编译 php index.php --build #运行生成的phar单文件程序 php tinyphp-demo.phar
框架安装
git clone https://github.com/tinyphporg/tinyphp-demo.git cd tinyphp-demo #兼容composer安装tinyphporg/tinyphp库 composer install tinyphporg/tinyphp-framework-1.0 @dev #直接git下载 mkdir lib/ && cd lib git clone https://github.com/tinyphporg/tinyphp-demo.git #运行 php index.php #编译 php index.php --build #开启守护进程 php index.php -d #具体配置文件 vi application/config/profile.php
一键搭建lnmp运行环境
lnmp-utils
框架所在的生产环境 ,Linux(CentOS7X_64) +openresty(nginx)+Mysql+PHP+Redis一键安装包.
项目地址: https://github.com/tinyphporg/lnmp-utils.git
CentOS 7x.x86_64/生产环境
git clone https://github.com/tinyphporg/lnmp-utils.git
cd ./lnmp-utils
./install.sh -m lnmp
curl http://127.0.0.1