|
Hi Rocky, In Two Simple Steps: 1. copy the file you want include to your "ROOT-FOLDER/vendors" folder. 2. In your controller , use vendor('filename'); Assuming I want to include workflow.php, my folder structure is |-htdocs |-app |-cake |-docs |-vendors So I copy workflowengine.php to vendors Then do vendor('workflowengine'); Leave out the '.php' extension. Once you do that, you will have access to all the methods and classes in workflowengine.php. Note: Vendors are for third-party classes. So be careful about using the Vendor thing. If it contains functions for views then make a helper. If its for controllers, create a component. However if it does not fall into any of these, then feel free and put it in the vendors folder. Find out more about vendors on cakephp.org Rocky wrote: PLz let me know how to add a file in php cake Thanku Rocky --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~--- |
- How to include a php file in php cake Rocky
- Re: How to include a php file in php cake Femi Taiwo
