Search code examples
phpzend-frameworkglobal-variablesvariable-initialization

Where to initialise a variable in zend application which i will need in my whole application?


I want to initialise a variable which i need to use across my zend application. Where am i supposed to initialise it ? In index.php or in bootstrap.php ?


Solution

  • Bootstrap is the correct place. Bootstrap is used for web applications and CLI applications against index.php is only used when the app is used as a web app.