摘要: 最近有在玩SAE网络营销培训(新浪的云计算平台),所以又玩回PHP。打算写个微博的应用的,于是 在写的过程里发现简单的controller机制很容易把代码搞得很混乱。于是就想着改进下控制的方式。以前一直以为controller只需要简单地把 url映射到函数或者其他什么,然后后续的工作就完全不用理了。现在想到另外一种控制:123456789101112131415161718192021<?phpfunction boot( $func ) { $context = array (); while ( $func = $func ( $context )) { ; }}boot( fun 阅读全文
posted @ 2011-12-30 19:55 吴雅琪 阅读(145) 评论(0) 推荐(0)