开发者

Does requestAction work on command line?

I am a newbie to cakephp and recently used a function $this->requestAction(); whic开发者_开发知识库h allows you interact between different controllers. But now I'm curious to know whether it works fine through command line or not? Thanks


This behavior should work just fine through the command line; or, I should say that any CakePHP function called through the command line should work just as it would through the browser. As long as your system allows it, PHP does the same thing despite the origin of the request.

If you are looking to separate command line functionality from Web functionality, then you may try Googling for creating a command line only dispatcher. Then, you can add some code to your controller that will only respond if the request is made from the command line. I do this for CRON jobs for my apps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜