php 精简框架
来源:互联网 发布:大数据金融企业 编辑:程序博客网 时间:2024/06/06 07:02
这个是根据面试题做出来的,最精简的框架,用一下午时间做出来。
为了功能实现,任何防护和过滤都没有。
作者:风来了.呆狐狸
<?php// 根目录define('ROOT', __DIR__);$c=trim($_REQUEST['c']);$a=trim($_REQUEST['a']);//配置加载include ROOT.'/config/config.php';header("Content-type:text/html;charset=".CHARSET);//控制器加载if (empty($c)) $c = 'index';if (empty($a)) $a = 'init';//是否已安装if (!file_exists(ROOT.'/install.lock')) { $c = 'install'; $a = 'init';}$file = ROOT.'/app/'.$c.'.php';if (file_exists($file)) { include ROOT.'/class/DB.php'; include ROOT.'/class/fun.php'; include $file; if(class_exists($c)){ $controller= new $c; if (method_exists($controller, $a)) { call_user_func([$controller, $a]); } else { exit('该动作不存在'); } }else{ exit('控制器不存在.'); }} else { exit('控制器不存在');}其他请看附件地址
http://download.csdn.net/detail/wljk506/8190339
面试题:
1. Introduction The following test-case1 is given to any future developer. The aim is to get to know you and the way you are working. We also want to test your basic PHP / MySQL skills. You have to use PHP / MySQL and you may use JavaScript. You should not use any predefined code downloaded from the internet. You are free on how you want to organize the files, database structure and code. You should try to develop in a way that allows for further increasing the functionality of the test-case 1 with little adjustments. 2. Task A tiny version of an address-book should be developed. There should be some sort of list showing all the entries already made, a form to create new entries and edit existing ones and the possibility to export the list into a XML-file. Each entry should consist of the fields (name, first name, street, zip-code, and city) where the city should be a drop down, with cities defined in a table in the database. The design should be user-friendly but 3. Procedure You have to develop this little program on your own system, then send the code files, a file containing all the queries needed to create the database, a file with the queries to enter test-data, and a file containing the hours you have worked and on what you have been working, to us. 4. Files to hand in a) Code files (may be several) b) File containing all the queries to setup the database c) File containing the queries to enter test-data d) The filled in journal (test-case_1.docx)
0 0
- php 精简框架
- 极其精简的PHP框架WJW
- php精简日历
- 精简dubbo框架,原理解析
- 微软.net精简框架最常见问题(转载)
- 《.NET精简框架程序设计》-译者序
- 提高精简框架集程序的性能
- 提高精简框架集程序的性能
- 提高精简框架集程序的性能
- .NET精简框架程序设计:C#版
- 微软.net精简框架最常见问题
- .NET精简框架程序设计:C#版
- SSH框架整合——精简版
- Extjs最精简的框架设计
- SSH框架整合——精简版
- 分享一个javascript alert精简框架
- 分享一个javascript alert精简框架
- 自创Java精简建表框架
- 程序猿之---C语言细节28(const变量初始化、数组大小用const变量细节、const变量与#define宏、volatile修饰)
- solr facet
- 3、myeclipse编译/操作时自动保存设置
- [CODEVS1225]埃及分数解题报告
- 很高兴获得了CIKM Competition数据挖掘竞赛的冠军
- php 精简框架
- GDI绘图函数小结
- [学习]第一个iOS小项目:随机点名的LuckyMan
- 8086_proteus_masm配置
- Android ListView源码分析 点滴记录
- 设计模式——模板设计模式
- 游戏标题特效
- 如何用php进行数据备份
- Qt让程序只运行一个实例