Skip to content

BanhmiDev/unio-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unio-php

License Releases Issues

A lightweight PHP framework based on the MVC pattern.
It also includes a simple MySQL-PDO-Database library.

Basics and How To's

Part of the routing is done with a simple .htaccess file.
URL requests should look like this: /controller/method/parameter. It will either default to the base-controller or to the error-controller if an invalid url was passed.

Naming convention:

  • Model nameModel.php can @extend BaseModel
  • View name.php
  • Controller nameController.php can @extend BaseController

Database library documentation coming soon.

Apache HTTP Server

Use the included .htaccess file.

Nginx

Include the following code into the respective server block.

location = / {
    index index.php;
}

location / {
    try_files $uri $uri.html $uri/;
    index index.php;
    if (!-e $request_filename) {
        rewrite ^/(.+)$ /index.php?url=$1;
    }
}

Installing and running

Simply clone/copy this project to your working Apache webserver and import the sql file located in the sql directory.

Configuration

See /app/config/config.php.

Demo

The latest working build is available at this site.

License

unio-php is licensed under the MIT License.

About

Simple MVC skeleton

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published