It should be placed within your bootstrap.php file, unless it could be a helper, component, etc.
On Jun 29, 6:15 am, DragonFlyEye <[email protected]> wrote: > It depends a lot on what the function is and what you plan to do with > it. However, as a general explanation: > > Since all Controllers extend the app_controller in the /cake folder, > you can create your own app_controller and put it in the /app/ > controllers folder and add your global function there. There However, > depending on the complexity and other factors, it might also make > sense to create a Component that contains your function. That way, > instead of weighing down every Controller with a global app_controller > function which you may not use in all of them, you can simply add your > Component to the Controllers that need it. > > On Jun 29, 6:12 am, amol <[email protected]> wrote: > > > Can anyone please tell me how to declare, define and call global > > function in cakephp. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
