PHP
Slim是一个微框架。
有一套和Lavarel很相似的路由机制。
有一个很详细的教程,详细到把基础request变量都说得很详细,我会觉得这么微的框架还要谈及这么琐碎的功能,那它本身可能真没什么功能。不过理解这些功能对于PHP程序员打好基础很有好处。比如说,文档会提及ETag,有助于程序员更好地理解缓存知识。
有中间件机制,有Hook机制。
没有显示地描述MVC的设计,没有数据库ORM模型。
PHP developers love Slim for developing Restful APIs and services, thanks to Josh Lockhart for creating this tiny beast. The best thing about starting with a micro framework like slim is that you don’t need to spend time learning it. The code base is so small that you can run through the entire code in a late night session.
1. 最基本的PHP框架
如果你从来没有使用过PHP框架,那么你至少应该选择一个PHP框架,这比完全自己写代码要好得多,至少有很多常见的问题框架的文档都会提及。而PHP框架中,ThinkPHP会是理想和基础的选择之一。我本人曾尝试过国外多用的Laravel,作为初学者,并没有发现Laravel比ThinkPHP有什么优越之处,反而缺点多多。
2. 中国人做的开源框架
符合国内大部分PHP开发者使用习惯,中文文档及社区完善。很多人懂,意味着容易招人。容易上手。而其它所有PHP框架基本上都是国外的(除了鸟哥惠新宸的Yaf),需要英文阅读能力过关,偶尔还要翻墙。
http://www.myphpquiz.com/question.php?qid=1
注意,每做完一题需要到页面右上角点击“Next Question”才能做下一题。
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum remove php-common # Need to remove this, otherwise it conflicts
yum install php54w
Event-driven, non-blocking I/O with PHP.
$avg = array_sum($a) / count($a);
通常,我们还需要把多余的小数去掉:
$avg2 = round($avg, 1);
热门内容
最新内容
- 2 天 19 小时 ago
- 5 天 19 小时 ago
- 1 周 5 天 ago
- 1 周 6 天 ago
- 1 周 6 天 ago
- 2 周 2 天 ago
- 4 周 2 天 ago
- 1个月 ago
- 1个月 ago
- 1个月 ago
最新评论