首页 > 后端开发 > php教程 > minPHP-轻量级的PHP框架

minPHP-轻量级的PHP框架

WBOY
发布: 2016-06-23 13:30:57
原创
1218 人浏览过

github下载:https://github.com/phillipsdata/minphp


来源:http://my.oschina.net/rain21/blog/477931



结构:

/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)
登录后复制


数据库查询:

首先配置config/database.php

<?php/** * @package minPHP * @subpackage minPHP.app.controllers */class Main extends AppController {		//index	public function index(){		$user=new Record();		//$rs=$user->select()->from("user")->where("id", "=", 1)->numResults();		$rs=$user->select()->from("user")->fetchAll();		print_r($rs);	}		//show	public function show(){		echo date('Y-m-d H:i:s',time());		return false;	}}?>
登录后复制


来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板