开发者

zend framework - is it possible to make a 'redirect' script in the library

Is it possible? How?

Let's say I have the ff:

class My_Redirect
{
  function test()
  {
     // 开发者_运维技巧some testing
     // another testing
     // redirect script
  }
}

Thanks in advance!


Yes it is possible, speaking technically. But since the 'controller' part of a MVC application does the request/response handling, I would not recommend it. The library can be seen as part of your 'models'.

If you want to redirect, you can use the controller helper redirector, you can use the Zend_Controller_Response object, or you can use the plain old php header() function (not recommended).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜