PHPackages                             tokyo-lei/easyphp4 - 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. tokyo-lei/easyphp4

ActiveLibrary[Framework](/categories/framework)

tokyo-lei/easyphp4
==================

EasyPHP Framework

4.0.1.x-dev(5y ago)501MITJavaScript

Since Oct 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Tokyo-Lei/EasyPHP4)[ Packagist](https://packagist.org/packages/tokyo-lei/easyphp4)[ RSS](/packages/tokyo-lei-easyphp4/feed)WikiDiscussions 4.0.1 Synced today

READMEChangelog (2)Dependencies (8)Versions (2)Used By (0)

EasyPHP4
========

[](#easyphp4)

 [![](https://raw.githubusercontent.com/Tokyo-Lei/EasyPHP4/master/Public/Home/img/logo.png)](https://raw.githubusercontent.com/Tokyo-Lei/EasyPHP4/master/Public/Home/img/logo.png)

 这是设计师开发的框架，你相信么？

[![](https://camo.githubusercontent.com/c39e3ba59c48c668f097b0e6c7e7131ae844de76bf363e81f94707af7aff586f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d342e302e302d677265656e2e737667)](https://camo.githubusercontent.com/c39e3ba59c48c668f097b0e6c7e7131ae844de76bf363e81f94707af7aff586f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d342e302e302d677265656e2e737667)[![](https://camo.githubusercontent.com/59c5dc5aa0f9e395e92e89b7a71e8283c462a8d4904123c32f80f3e981e00bd5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372b2d627269676874677265656e2e737667)](https://camo.githubusercontent.com/59c5dc5aa0f9e395e92e89b7a71e8283c462a8d4904123c32f80f3e981e00bd5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372b2d627269676874677265656e2e737667)[![](https://camo.githubusercontent.com/a28ee01552017b7c4e025944cca27e18a5f92976631b90b23392d39db2eec525/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d7973716c2d352b2d6f72616e67652e737667)](https://camo.githubusercontent.com/a28ee01552017b7c4e025944cca27e18a5f92976631b90b23392d39db2eec525/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d7973716c2d352b2d6f72616e67652e737667)[![](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)

简介
--

[](#简介)

EasyPHP Framework 4 是为快速开发而生框架,基于composer开发的第四代PHP MVC框架！

此框架借鉴国内知名ThinkPHP框架思想来完成开发。

框架采用MVC的设计模式，对初学者有一定难度。

将来即将孵生针对各个应用场景，比如：用户中心、博客、文章CMS等程序。

安装环境
----

[](#安装环境)

- PHP：7.0 以上
- Composer：2.0RC-1
- PSR标准：PSR-4
- 后台风格基于bootswatch litera

协议说明
----

[](#协议说明)

- 本代码开源遵循MIT协议。
- 部分代码COMPOSER和类库来源第三方。

```
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

```

目录结构
----

[](#目录结构)

```
App
   |- admin          //后台目录
        |-controller //控制器
             |-conn  //配置控制器文件夹
             |-index //后台首页控制器文件夹
             |-user  //用户控制器文件夹
         |- model    //模型
             |-UserModel.php //用户模型
         |- view     //视图
             |- article //文章视图文件夹
             |- conn    //配置视图文件夹
             |- include //页头、页脚、导航等视图文件夹
             |- index   //后台首页视图文件夹
             |- user    //用户登录等视图文件 夹
   |-	home              //前台目录
         |-controller     //前台控制器
             |-HomeController.php    //前台控制器
         |- model        //前台模型
         |- templates    //前台模板
         |- member       //前台用户中心
   |- config  //配置文件夹
   |- file    //缓存文件夹
   |- library //类库
   |-	Bootstrap.php  //主体核心文件
   |- Router.php     //路由
Public
   | - index.php     //PHP启动文件
vendor               //composer 第三方类库文件夹
```

使用安装
----

[](#使用安装)

- 直接下载源码composer安装第三方库

```
composer install
```

- 数据库配置

数据库表easyphp 用户名和密码分别是 `admin`

- 直接composer安装

```
composer require tokyo-lei/easyphp4
```

开发手册
----

[](#开发手册)

所有PHP文件名采用驼峰法（首字母大写），文件目录都小写。

#### 创建简单的Hello World !

[](#创建简单的hello-world-)

第一步：app目录下home文件是前台模块，打开app/home/controller/文件夹创建IndexController.php文件。

代码如下：

```
