What does the config file included contain exactly? If you can attach the controller in question I can probably spot anything obvious too.
Best regards, Paddy Mauricio Cuenca wrote: > > Hello Paddy, > > I use Zend_Config in some parts, but in this case I really need to include > a generic config file. I do not get any error message, just a blank page > is showed to me. If I comment the line, it works automatically. > > > > Pádraic Brady wrote: >> >> Hi Mauricio, >> >> What error exactly are you getting? >> Also are you trying to get the configuration data injected right into an >> Action, or into an instance of Zend_Config? >> >> Including really just appends the include's code into that location - so >> where you put the include statement is important. Using include files >> with PHP content as a source for Zend_Config is also covered in the >> manual - it actually uses require there I believe since the included file >> can be a simple "return array(..my configuration array...);" as regards >> content. >> >> Best regards, >> Paddy >> >> Mauricio Cuenca wrote: >>> >>> Hello, >>> >>> I am building a new application and I want to place database stuff and >>> configuration in one file. But when I include the files in any of the >>> controller scripts I get an error. >>> >>> I am sure the problem is not related to a file not found or a syntax >>> error, I am doing something like this in IndexController.php: >>> >>> /** Zend_Controller_Action */ >>> require_once 'Zend/Controller/Action.php'; >>> require_once 'Zend/View.php'; >>> >>> include_once 'myconfig.php'; >>> >>> Is not allowed to have files at this point? I have to include each one >>> in each action function. >>> >>> Thanks! >>> >>> >>> >> >> > > ----- Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation - Irish Representative -- View this message in context: http://www.nabble.com/Using-include_once-tp15333284s16154p15336335.html Sent from the Zend Framework mailing list archive at Nabble.com.