exactly in short: you don't most cases you got your coding wrong. try to put your code into the model, a component, a lib or some other more generic class where you can access and call it from all controller methods you need it. but including other controllers will only result in a mess in the long run.
Am Dienstag, 17. Juli 2012 08:53:12 UTC+2 schrieb Dr. Tarique Sani: > > While you can do what Chetan says - you should not be required to that... > > Consider creating a component if several of your component share the > same code OR slight less worse than above create a method in app > controller > > HTH > Tarique > > On Tue, Jul 17, 2012 at 12:16 PM, Chetan Patel > <[email protected]> wrote: > > hi > > > > Please refer below code > > > > App::import('Controller', 'Posts'); > > > > $Posts = new PostsController; > > > > $Posts->constructClasses(); > > > > > > > > > > > > Thanks > > Chetan Patel > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 17, 2012 at 11:57 AM, sneha kulkarni > > <[email protected]> wrote: > >> > >> how i can call one function of one controller into another > controller.plz > >> help > >> > >> -- > >> Our newest site for the community: CakePHP Video Tutorials > >> http://tv.cakephp.org > >> Check out the new CakePHP Questions site http://ask.cakephp.org and > help > >> others with their CakePHP related questions. > >> > >> > >> To unsubscribe from this group, send email to > >> [email protected] For more options, visit this > group > >> at http://groups.google.com/group/cake-php > > > > > > -- > > Our newest site for the community: CakePHP Video Tutorials > > http://tv.cakephp.org > > Check out the new CakePHP Questions site http://ask.cakephp.org and > help > > others with their CakePHP related questions. > > > > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this > group at > > http://groups.google.com/group/cake-php > > > > -- > ============================================================= > PHP for E-Biz: http://sanisoft.com > ============================================================= > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
