摘要: 1. 创建用户一枚, sudo addgroup hadoop sudo adduser -ingroup hadoop hadoop_lcc 2. 为新创建的用户添加sudo权限 sudo gedit /etc/sudoers--> hadoop_lcc ALL=(ALL:ALL) ALL 3. 阅读全文
posted @ 2016-05-02 21:12 浮萍生根 阅读(221) 评论(0) 推荐(0) 编辑
摘要: APP->run()代码如下: /** * Run application * * This method traverses the application middleware stack and then sends the * resultant Response object to the 阅读全文
posted @ 2016-01-29 18:05 浮萍生根 阅读(395) 评论(0) 推荐(0) 编辑
摘要: index.php代码如下: $app->get('/forbase', function ($request, $response, $args){ Example\Module\Base::instance()->init($request,$response); return $respons 阅读全文
posted @ 2016-01-28 19:24 浮萍生根 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 上两篇中分析了route是怎么被加进来的,以及如何被匹配的。这篇说一下route middleware是如何被加进来的,即add进来的。index.php的代码如下: $app->get('/forbase', function ($request, $response, $args){ Examp 阅读全文
posted @ 2016-01-28 18:26 浮萍生根 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 先标记觉得以后会用到的内容: // add route to the request's attributes in case a middleware or handler needs access to the route $request = $request->withAttribute(' 阅读全文
posted @ 2016-01-27 19:46 浮萍生根 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 上一篇中分析了get()如何加入新的route的,这篇来分析route是如何被调用的。 首先,route是在routers里保存,router有在container中存放。container提供了get()方法获取里面的元素,性质类似于Set()。这个性质见Slim\Container的get()和 阅读全文
posted @ 2016-01-27 17:50 浮萍生根 阅读(594) 评论(0) 推荐(0) 编辑
摘要: 看看官网加粗的一句话: At its core, Slim is a dispatcher that receives an HTTP request, invokes an appropriate callback routine, and returns an HTTP response. Th 阅读全文
posted @ 2016-01-26 22:13 浮萍生根 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 继续上一篇的问题,如何动态的添加不同的Module。添加Module是给Middleware用的,用于调用Module的写日志方法。上篇中的写法是在app->add(mv),这时的middleware是全局的。其实可以给每个route添加middleware,这个思路是通过阅读官方文档获得的,所以说 阅读全文
posted @ 2016-01-26 18:58 浮萍生根 阅读(1349) 评论(0) 推荐(0) 编辑
摘要: 昨天说到能够成功将本地的URL通过在index.php 中添加get(pattern,clouser)路由到指定的处理类中,处理后(这里指存入数据库中),然后返回response在浏览器中显示。 昨天最后留的问题是:能不能在App的container中添加自己的key呢,今天还没有解决。 今... 阅读全文
posted @ 2016-01-22 21:50 浮萍生根 阅读(736) 评论(0) 推荐(0) 编辑
摘要: 因为公司的项目用到是slim 框架,所以想把它学习一下。在公司用到是Slim2版本,现在官网已经到达 Slim3的版本了。官网地址:http://www.cnblogs.com/lmenglliren89php/。 首先按照官网的教程,安装Slim: 1.curl -sS https:/... 阅读全文
posted @ 2016-01-21 22:05 浮萍生根 阅读(1382) 评论(1) 推荐(0) 编辑