« Return to Thread: Dumb Question

Dumb Question

by Joseph Crawford :: Rate this Message:

Reply to Author | View in Thread

In my index.php bootstrap file I setup the database connection into a  
variable $db.  Now I need to access this in other controllers.  This  
seems like a dumb question to me but do I need to global $db; before I  
can access it in the indexAction method of the controller or is it in  
the global scope by default?

Thanks,
Joseph Crawford

 « Return to Thread: Dumb Question

LightInTheBox - Buy quality products at wholesale price