GitHub Download: https://github.com/phillipsdata/minphp
Source: http://my.oschina.net/rain21/blog/477931
Structure:
/app /controllers - where all controllers are to be placed /models - where all models are to be placed /views - where all views are to be placed /default - a collection of related display components /css / images /javascript/cache - where cached views are stored (muSt be writable to use)/components - where components are placed/config - where configuration files are to be stored/ helpers - where all helpers are located/language - each language has its own directory in here / en_us - the default language directory/lib - where all core minPHP files are located/plugins - where all minphp plugins are stored/vendors - where vendor code is placed (i.e. third party libraries)
Database query:
Configure config/database.php First
<?php/** * @package minphp * @subpackage minPHP.app.controllers */class Main extends AppController {//indexpublic funct Ion Index () {$user =new Record ();//$rs = $user->select ()->from ("User")->where ("id", "=", 1)->numresults (); $rs = $user->select ()->from ("User")->fetchall ();p rint_r ($RS);} Showpublic function Show () {echo date (' y-m-d h:i:s ', Time ()); return false;}}? >
minphp---lightweight PHP framework