3 Star 0 Fork 0

TracyJeffrey / Techoy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.php 828 Bytes
一键复制 编辑 原始数据 按行查看 历史
TracyJeffrey 提交于 2018-01-16 18:39 . 12
<?php
/**
* 后台的单入口文件
*/
//定义基础的目录全局常量
define("ROOT_PATH", getcwd()."/");
define("APPLICATION", ROOT_PATH."Application/");
define("FRAMEWORK", ROOT_PATH."Framework/");
//获取传值参数
$controller = isset($_GET["c"])?$_GET["c"]:"index"; // $controller = user
$action = isset($_GET["a"])?$_GET["a"]:"listObjects"; //$action = listObjects
$group = isset($_GET["g"])?$_GET["g"]:"Font"; //$action = listObjects
define("CONTROLLER", $controller); ///user
define("ACTION", $action); // listObjects
define("GROUP", $group);
//引入自动加载文件
require_once FRAMEWORK."autoload.php";
//定义真正的controller的类的名称 // userController
$controllerName = $controller."Controller";
echo $controllerName;
$controller = new $controllerName();
$controller->$action();
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/TracyJeffrey/ASiDiFen.git
git@gitee.com:TracyJeffrey/ASiDiFen.git
TracyJeffrey
ASiDiFen
Techoy
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891