Skip to content

tinyphporg/tinyphp-framework-1.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyPHP For Framework-1.0

简介

框架安装

一键搭建lnmp运行环境

框架编码规范

一、PHP编码规范

SQL规范

简介

一款经过生产环境检验(日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
 

框架开发规范

一、PHP编码规范

第一章 文件结构

第二章 程序的排版

第三章 命名规则

第四章 表达式和基本语句

第五章 常量

第六章 函数设计

第七章 IDE的选择

第八章 编码规范的一些示例



二、SQL使用规范

第一章 查询规范

第二章 库和表的规范

第三章 数据库设计原则

第四章 数据库优化原则



三、框架使用手册

第一章 框架入门

About

一款经过生产环境检验(日PV10亿级)的轻量级PHP框架,此为1.0高性能版本,毫秒级响应。

Resources

Stars

Watchers

Forks

Packages

No packages published