# Imop **Repository Path**: worldly-way/imop ## Basic Information - **Project Name**: Imop - **Description**: Imop php极简框架 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-08-31 - **Last Updated**: 2024-02-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Imop php极简框架 #### 介绍 php极简框架 自己在做一些简单系统时,经常为了php框架烦恼;其他的框架又太复杂,做一些简单的项目又用不到;因而想自己整理出来一个简单点的通用框架,结合自己的使用这就有了php极简框架。 简洁Imop php极简框架,功能虽少,倒也满足简单的功能,也能够快速上手,希望大家支持。 Imop php极简框架是完全开源免费的,大家可以放心在学习和商业中使用,无需找我授权。 #### 使用说明 ``` //定义项目调试模式在入口文件中修改 //路由设置在route.php类库修改 //index.php/index/index 前台首页 //index.php/admin/index 后台首页 //index.php/controller/action 说明 //index.php/控制器/方法(动作) 说明 其他参数转为$_GET变量 //index.php/index/index/id/4561231456/?uid=45 $_GET //$_GET['lp0']=id //$_GET['lp1']=4561231456 //$_GET['uid']=45 还有数据库操作 在Mysql.php类库 默认不会加载Mysql.php 使用时添加require CORE.'/lib/Mysql.php'; 某个吃灰项目的源代码 fields('id,web_name,web_description,zid,web_logo,count,hot')->limit(0, 10)->select(); //love_website 为数据库表名 //id,web_name 为数据库表名 //limit输出前10行的内容 //$Mysqlp->query("原生SQL"); //可以参考https://www.cnblogs.com/xixi18/p/8494306.html文章 foreach ($objects as $key => $obj) { echo '
'.$obj->web_description.'

'.$obj->web_name.'

'; } ?> ``` > 本人刚上高中才接触php,可能有些地方写的不好或者有BUG。希望大家可以指出. ## 目录结构 初始的目录结构如下: ~~~ www WEB部署目录(或者子目录) ├─core 应用目录 │ ├─common 公共模块目录(可以更改) │ ├─lib 模块目录 │ │ ├─config.php 模块配置文件 │ │ └─ ... 更多类库 │ └─val 视图目录 │ ├─ admin后台视图 │ └─ index前台视图 ├─static 静态资源目录 │ ├─admin 后台目录 │ │ └─... 前台静态资源 │ └─... 前台静态资源 └─index.php 入口文件 ~~~