分享一个自己写的PHP网站开发简易MVC框架 ——GiWebFrame


GiWebFrame

主要是接了学校的一个小小型网站开发,个人不太希望用现在主流的网络上的较为臃肿的框架来开发,所以寒假在家花费了2天左右时间写了一个网站开发轻量框架,取了一个简单的名字GiWebFrame

现在开源共享给大家,供大家学习,这只是一个简易的MVC思路,供新手学习吧,大神就直接多提建议吧。框架挺小的,我还有安全方面没有考虑完全,大家可以自己写出安全类也挺方便的!

GiWebFrame最新版本:v1.1 alpha
最近更新时间:2016年1月28日
项目Github地址:https://github.com/godcheese/GiWebFrame.git

大家也可以关注我的个人github主页:http://github.com/godcheese

<?php
/**
 * @project :   GiWebFrame
 * @version :   v1.1 alpha
 * @author  :   godcheese
 * @website :   https://blog.godcheese.com
 * @github  :   https://github.com/godcheese
 * @link    :   https://github.com/godcheese/GiWebFrame.git
 * @copyright    :   godcheese copyright all reserved.
 * @date    :   2016.01
 *
 */

//*******************************Main***************************************//

//定义根目录
defined('ROOT_PATH')?:define('ROOT_PATH',dirname(__FILE__));

//引用控制器控制类
require_once ROOT_PATH.'/include/controller.class.php';

//引用html视图代码输出类
//require_once ROOT_PATH.'/include/view.class.php';

//抽象控制器控制类
controller=new controller(false);

//判断是否在首页
if(controller->isHome()){
    resContent=controller->callController('page','home'); //指定 首页home页面
    echo resContent;
}else{
    echocontroller->callController(controller->getController(),controller->getMethod());
}

?>

思维导图:
routerController.class.php
GiWebFrame blog.godcheese.com


发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注