Vendors is a great way to include stuff:

1. Stick your php file in /app/vendors
2. Get it in Cake with vendor('nameoffile');

Globals work best in AppController for me, but I suppose you can  
throw things in /app/config/bootstrap.php as well.

-- John

On May 16, 2006, at 5:20 PM, John Zimmerman [gmail] wrote:

> I have a file I often include that has a bunch of arrays that I  
> made with data for things like United States, names/abreviations/ 
> etc...
>
>
> I am trying to use require_once to include this file in the  
> app_controller.php and then access the data by declaring a "global"  
> in local scope.
>
> So far I have been unable to get this to work.  My variables aren't  
> accessible.
>
> Has anyone else run into problems using globals?
>
> I have used globals outside of the cakephp framework on this same  
> webserver before.
>
> If you have a suggestion as to a way to do this better I am all  
> ears as well.
>
> Thanks
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to