0
Redirect ('controller_name'); 

http モードでは動作しますが、cmd モードでは動作しません。

Codeigniter の CMD モードで別のコントローラーに転送するにはどうすればよいですか?

I'm trying to achieve the following.
Controller A forward to Controller B (one of many subclasses of A decided upon what Model A returns in that time) in cron jobs.
4

1 に答える 1

1

Redirectheader('location: controller_name');CLI モードでは実行できないことを単純に実行します。

別のコントローラーをロードして実行しようとしている場合は、HMVC (http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/) メソッドを参照することをお勧めします。

modules::run('controller_b/action/param');

それ以外の

redirect('controller_b/action/param');

それが役立つことを願っていますか?

于 2012-05-30T13:41:44.413 に答える