Skip to content

Commit

Permalink
V1.0
Browse files Browse the repository at this point in the history
Idea framework V1.0 正式版发布
  • Loading branch information
tehubcom committed Oct 18, 2016
1 parent 3f31b38 commit 15def6b
Show file tree
Hide file tree
Showing 26 changed files with 1,343 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^(system) - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<h1> Idea framework 超轻量级PHP框架</h1>
<h3>Idea核心理念</h3>
* 用户体验目标:简单到极致!
* 降低框架学习成本,以最好的通用性开发低耦合的产品。

<h3>框架功能简述</h3>
* 超轻量级框架,拥有框架应有的核心功能。
* 完全基于OOP思想、MVC架构开发。
* 自动加载psr-4标准化,编码遵守PSR-2
* 支持PHP7.x+,支持跨平台开发。
* 支持自定义项目结构,入口绑定支持(多入口)。
* 完善的路由支持:普通模式、PATHINFO、伪静态等。
* 原生PHP模板引擎,可轻松扩展其它模板引擎(如smarty、twig等)。
* 数据操作基于PDO,多数据库支持,CURD使用原生SQL,无须深入学习框架。
* 推荐使用composer进行类库扩展。

文档地址:http://www.kancloud.cn/yunfei_z/framework

电子邮箱:[email protected]

作者主页:http://ideait.net

#### 当前版本:V1.0

#### 2016-10-18 发布Idea framework V1.0 正式版
19 changes: 19 additions & 0 deletions application/admin/controller/Common.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* 后台公共控制器,继承控制器基类
* 使用的smarty模板引擎
*/
namespace app\admin\controller;


/**
* Class Common
* @package app\admin\controller
*/
class Common
{
public function __construct()
{

}
}
28 changes: 28 additions & 0 deletions application/admin/controller/Index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* 后台入口控制器
* @Description
* @Copyright Copyright(c) 2016
* @Author Alan
* @E-mail [email protected]
* @Datetime 2016/05/10 21:11:35
* @Version 1.0
*/
namespace app\admin\controller;


/**
* Class Index
* @package app\admin\controller
*/
class Index extends \app\admin\controller\Common
{
/**
* 输出后台首页
* @return string [description]
*/
public function index()
{
echo '欢迎访问后台,<a href="index.php">返回</a>';
}
}
26 changes: 26 additions & 0 deletions application/admin/model/User.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* 网站管理员模型
* @Description
* @Copyright Copyright(c) 2016
* @Author Alan
* @E-mail [email protected]
* @Datetime 2016/05/10 22:15:39
* @Version 1.0
*/
namespace app\admin\model;

use system\Model;


/**
* Class User
* @package app\admin\model
*/
class User extends Model
{
public function addUser()
{

}
}
10 changes: 10 additions & 0 deletions application/admin/view/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>{#$title#}</title>
</head>
<body>
<h3>后台首页</h3>
欢迎您,{#$info#}。
</body>
</html>
Binary file added application/common/404/images/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added application/common/404/images/404_bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 110 additions & 0 deletions application/common/404/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<html>
<head>
<!--解决 IE6 背景缓存-->
<!--[if IE 6]>
<script type="text/javascript">document.execCommand("BackgroundImageCache", false, true);</script><![endif]-->
<meta charset="utf-8">
<title>404 Not Found!</title>
<style type="text/css">
html {
background: url(<?=__APP__.'/common/404/images/404_bg.jpg'?>) !important;
}

a, fieldset, img {
border: 0;
}

a {
color: #221919;
text-decoration: none;
outline: none;
}

a:hover {
color: #3366cc;
text-decoration: underline;
}

body {
font-size: 24px;
color: #B7AEB4;
}

body a.link, body h1, body p {
-webkit-transition: opacity 0.5s ease-in-out;
-moz-transition: opacity 0.5s ease-in-out;
transition: opacity 0.5s ease-in-out;
}

#wrapper {
text-align: center;
margin: 100px auto;
width: 594px;
}

a.link {
text-shadow: 0px 1px 2px white;
font-weight: 600;
color: #3366cc;
opacity: 1;
}

h1 {
text-shadow: 0px 1px 2px white;
font-size: 24px;
opacity: 0;
}

img {
-webkit-transition: opacity 1s ease-in-out;
-moz-transition: opacity 1s ease-in-out;
transition: opacity 1s ease-in-out;
height: 202px;
width: 199px;
opacity: 0;
}

p {
text-shadow: 0px 1px 2px white;
font-weight: normal;
font-weight: 200;
opacity: 1;
}

.fade {
opacity: 1;
}

.info {
font-size: 14px;
color: #a29d9d;
}

@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
#wrapper {
margin: 40px auto;
text-align: center;
width: 280px;
}
}
</style>
</head>
<body>
<div id="wrapper">
<a href=<?= __ROOT__ ?>><img class="fade" src="<?= __APP__ . '/common/404/images/404.png' ?>"></a>
<div>
<h1 class="fade">温馨提示,您访问的地址不存在!</h1>
<p class="info">
<label>可能原因:</label>
网址有错误&gt;请检查地址是否完整或存在多余字符<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
网址已失效&gt;可能页面已删除,活动已下线等
</p>
<p class="fade">您正在寻找的页面无法找到,
<a class="link" href=<?= __ROOT__ ?> onclick="history.go(-1)">回到首页?</a></p>

</div>
</div>
</body>
</html>
35 changes: 35 additions & 0 deletions application/common/Helper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* 公共函数,放置用户自定义函数
* @return [type] [description]
*/

/**
* 格式化打印函数
* @param mixed $val 传入的字符/数据/对象..
* @param bool $dump 指定使用vardump();
* @param bool $exit
*/
function debug($val, $dump = false, $exit = true)
{
if ($dump) {
$func = 'var_dump';
} else {
$func = (is_array($val) || is_object($val)) ? 'print_r' : 'printf';
}
echo '<pre>debug output:<hr />';
$func($val);
echo '</pre>';
}

/**
* 打印框架已定义常量
* @return mixed $constArr 数组格式所有的预定义常量
*/
function printConst()
{
$constArr = get_defined_constants(true);
echo '<pre>';
var_dump($constArr['user']);
echo '</pre>';
}
Loading

0 comments on commit 15def6b

Please sign in to comment.