放弃phalconphp framework,学习曲线太高了。

举个例子,我要实现redirect功能,结果发现:

$this->forward('index/index'); //继续执行本controller下的indexAction
$this->dispatcher->forward(array('controller'=>'index','action'=>'index')); //继续执行其他controller下的action

真正的redirect要这样写:

$response = new Phalcon\Http\Response();
$response->redirect("posts/index");  //PhalconException: A dependency injection object is required to access the 'url' service google也找不到报错原因
$this->view->disable(); //必须用这个命令禁止当前Action下的模版输出

拜托,既然你已经是framework了,可不可以不要这么复杂。

还是用thinkphp好了,真的对性能要求特别高的时候再说吧。

posted @ 2013-01-19 16:39  up1m  阅读(398)  评论(0)    收藏  举报