james-little/lightmvc

一个轻量级的MVC(模型-视图-控制器)Web框架,用于快速构建Web和批处理应用程序

dev-master 2019-02-12 02:48 UTC

This package is auto-updated.

Last update: 2024-09-12 15:03:11 UTC


README

===================== Web服务器框架。一个支持模块的纯MVC(模型-视图-控制器)构建框架。

环境

  • 推荐使用Linux
  • PHP 5.3+

特性

- MVC
- multiple database support(Mysql, postgreSQL)
- configurable database sharding
- master-slave support
- 1 master with N slaves load banlance
- multiple cache support(memcached, redis)
- search engine support(solr)
- multiple language
- multiple output(html, json)
- maintenance time setable

需要的PHP模块

- gettext
- PDO
- mysql
- memcached
- phpredis
- solr
- json
- mcrypt

如何使用

===================== 在开始使用之前,请确保将框架-web库克隆到本地磁盘,并在您的lib目录中创建一个符号链接

directory structure
/ project folder
|-- lib             <- framework, library folder, make sure your libraries put here
|-- protected       <- source code
|   |-- config      <- config
|   |   |-- common  <- common part
|   |   |-- develop <- develop
|   |   |-- staging <- staging
|   |   |-- production <- production
|   |
|   |-- modules      <- modules
|   |   |-- testModule
|   |       |-- controller
|   |       |-- model
|   |       |-- logic
|   |-- plugins      <- customize plugins
|   |-- script       <- batch scripts
|   |-- sql          <- sql scripts
|   |-- view         <- view folder 
|
|-- Crawler.php      <- main class
|-- bootstrap.php    <- php settings or other
|-- public           <- open for public
    |-- index.php
    |-- img          <- images files
    |-- css          <-- css files
    |-- js           <-- javascript files

示例:假设您的框架文件夹位于/home/user/project/framework-web,您的项目文件夹位于/home/user/project/your_project

  1. git clone git@git.warabi-pro.jp:engineer/framework-web.git /home/user/project/framework-web
  2. git clone git@git.warabi-pro.jp:warabi-pro/engineering-crawler.git /home/user/project/your_project
  3. mkdir /home/user/project/your_project/lib
  4. ln -s /home/user/project/framework-web /home/user/project/your_project/lib/mvc