2017 © Pedro Pelรกez
 

project tinymvc

TinyMVC is a small PHP MVC framework

image

jockchou/tinymvc

TinyMVC is a small PHP MVC framework

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 7 % Grown

The README.md

logo, (*1)

TinyMVC PHP Framework

TinyMVC is a small PHP MVC framework, (*2)

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock, (*3)

Installation

It's recommended that you use Composer to install this framework., (*4)

composer create-project jockchou/tinymvc

How to run

[root@localhost public]# php -S localhost:9000
PHP 7.0.11 Development Server started at Fri Sep 23 09:52:14 2016
Listening on http://localhost:9090
Document root is /var/tinymvc/public
Press Ctrl-C to quit.

Browse

Open browser, enter http://localhost:9000 in the address bar, (*5)

logo, (*6)

HelloWorld

import resource/tiny.sql file to your MySQL database, Modify /config/dev/database.php, (*7)

$config['default']['dsn'] = 'mysql:host=localhost;port=3306;dbname=tiny;charset=utf8mb4';
$config['default']['username'] = 'root';
$config['default']['password'] = '123456';

open http://localhost:9000/hello/greeting on your browser, (*8)

Structure

.
โ”œโ”€โ”€ application
โ”‚ย ย  โ”œโ”€โ”€ controller
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ HelloController.php
โ”‚ย ย  โ”œโ”€โ”€ model
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ UserModel.php
โ”‚ย ย  โ””โ”€โ”€ view
โ”‚ย ย      โ”œโ”€โ”€ 404.php
โ”‚ย ย      โ”œโ”€โ”€ 500.php
โ”‚ย ย      โ”œโ”€โ”€ Hello
โ”‚ย ย      โ”‚ย ย  โ””โ”€โ”€ greeting.php
โ”‚ย ย      โ””โ”€โ”€ welcome.php
โ”œโ”€โ”€ composer.json
โ”œโ”€โ”€ composer.lock
โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ dev
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ database.php
โ”‚ย ย  โ””โ”€โ”€ prd
โ”‚ย ย      โ””โ”€โ”€ database.php
โ”œโ”€โ”€ core
โ”‚ย ย  โ”œโ”€โ”€ Application.php
โ”‚ย ย  โ”œโ”€โ”€ Controller.php
โ”‚ย ย  โ”œโ”€โ”€ FrameworkException.php
โ”‚ย ย  โ”œโ”€โ”€ Model.php
โ”‚ย ย  โ””โ”€โ”€ Template.php
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ public
โ”‚ย ย  โ”œโ”€โ”€ css
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ normalize.css
โ”‚ย ย  โ”œโ”€โ”€ favicon.ico
โ”‚ย ย  โ”œโ”€โ”€ images
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ logo.png
โ”‚ย ย  โ”œโ”€โ”€ index.php
โ”‚ย ย  โ””โ”€โ”€ js
โ”‚ย ย      โ””โ”€โ”€ zepto.min.js
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ resource
โ”‚ย ย  โ”œโ”€โ”€ logo.png
โ”‚ย ย  โ”œโ”€โ”€ TinyMVC.png
โ”‚ย ย  โ””โ”€โ”€ tiny.sql
โ””โ”€โ”€ runtime
    โ””โ”€โ”€ logs

Nginx

server {
        listen       80;
        server_name  tinymvc.anole.me;
        root         /var/tinymvc/public;
        charset      utf8;

        access_log  logs/tinymvc.access.log  main;
        error_log  logs/tinymvc.error.log;

        location / {
            try_files $uri /index.php$is_args$args;
        }

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ ^/index\.php(/|$) {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

        location ~ \.php$ {
            return 404;
        }
}

Demo

http://tinymvc.anole.me, (*9)

Contact

jockchou@qq.com, (*10)

The Versions

24/10 2016

dev-master

9999999-dev https://github.com/jockchou/TinyMVC

TinyMVC is a small PHP MVC framework

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6

 

micro framework mvc tinymvc

23/09 2016

dev-dev

dev-dev https://github.com/jockchou/TinyMVC

TinyMVC is a small PHP MVC framework

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6

 

micro framework mvc tinymvc

23/09 2016

1.0.0

1.0.0.0 https://github.com/jockchou/TinyMVC

TinyMVC is a small PHP MVC framework

  Sources   Download

Apache-2.0

The Requires

  • php >=5.6

 

micro framework mvc tinymvc