PHPackages                             ptphp/ptphp - 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. [Framework](/categories/framework)
4. /
5. ptphp/ptphp

ActiveLibrary[Framework](/categories/framework)

ptphp/ptphp
===========

a simple php framework.

v0.0.16(10y ago)056MITJavaScriptPHP &gt;=5.4

Since Mar 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ptphp/ptphp)[ Packagist](https://packagist.org/packages/ptphp/ptphp)[ Docs](http://www.ptphp.com)[ RSS](/packages/ptphp-ptphp/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (17)Used By (0)

[![Build Status](https://camo.githubusercontent.com/770ace8f293a8ec7d3a7022b63411c0dcb23d9f79ddd3de1136e48312ff77312/68747470733a2f2f7472617669732d63692e6f72672f70747068702f70747068702e737667)](https://travis-ci.org/ptphp/ptphp)[![Latest Stable Version](https://camo.githubusercontent.com/35987ffd74bfb3ce4fb7be6ad320d4023767acab48efe7d398228f11a93c8cba/68747470733a2f2f706f7365722e707567782e6f72672f70747068702f70747068702f762f737461626c652e706e67)](https://packagist.org/packages/ptphp/ptphp)

目录结构
====

[](#目录结构)

```
project
├── README.md
├── app                     # 后台源码
│   ├── common              # 常用代码库
│   ├── config              # 网站后端配置
│   ├── src                 # PHP主要源代码
│   │   ├── Controlelr      # 控制器
│   │   ├── Model           # 模型
│   │   ├── Models          # 未迁移模型,会合并到 Model,没有使用 namespace
│   │   └── View            # 视图
│   ├── api.php             # 接口初始化代码
│   ├── ptphp.php           # Cli初始化代码
│   └── init.php            # 后台初始化代码
├── bin                     # 命令行执行代码
│   └── deploy.php          # 部署脚本
├── etc                     # 服务器配置
│   ├── nginx               # Nginx配置
│   └── supervisor          # 守护进程配置
├── logs                    # 日志
├── docs                    # 文档说明
├── src                     # 源码
│   └── PtPHP               # PtPHP
├── tests                   # 测试代码
├── webroot                 # 网站根目录
├── package.json            # package.json
├── composer.json           # composer.json
├── phinx.yml               # 数据库配置
└── webpack.config.js       # webpack配置文件

```

安装
==

[](#安装)

```
npm install webpack-dev-server webpack -g -d
cp package.dist.json package.json
npm install -d
npm run fix_antd
cp composer.dist.json composer.json
composer config repo.packagist composer https://packagist.phpcomposer.com
composer clearcache
composer install
composer require ptphp/ptphp

```

配置
==

[](#配置)

```
#数据库
cp phinx.dist.yml phinx.yml

#系统配置
##开发环境
cp app/config/env/development.dist.php app/config/env/development.php

##测试环境
cp app/config/env/testing.dist.php app/config/env/testing.php

#前端配置
cp app/config/app.dist.json app/config/app.json

#webpack config
cp webpack.config.dist.js webpack.config.js

#系统环境(虚拟主机或者不能配置服务器环境变量专用)
#cp app/config/.env.dist.php app/config/.env.php

vendor/bin/phinx migrate

```

运行
==

[](#运行)

```
npm start

```

open in browser
===============

[](#open-in-browser)

```
http://127.0.0.1:3080

```

编译
==

[](#编译)

```
npm run build

```

Resources
=========

[](#resources)

- [react-icons](https://github.com/gorangajic/react-icons)
- [phinx](https://phinx.org/)
- [composer](http://docs.phpcomposer.com/)
- [html-webpack-template](https://github.com/jaketrent/html-webpack-template)
- [lodash](https://lodash.com/docs)
- [ant.design](http://ant.design/docs/react/introduce)
- [react](http://facebook.github.io/react/)
- [iconfont](http://iconfont.cn/)

Author
======

[](#author)

### 文档

[](#文档)

- [phinx](./docs/phinx.md)

### License

[](#license)

The MIT License()

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community1

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Every ~2 days

Total

15

Last Release

3685d ago

PHP version history (2 changes)v0.0.1PHP &gt;=5.4

v0.0.9PHP &gt;=5.6

### Community

### Embed Badge

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

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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