i have a php file that contains a list of variables (a list of error messages) and nothing else.
in my controller, i included the file using the following line right before the definition of my controller
require_once PATH_TO_FILE;
class mycontrollerController extends Zend_Controller_Action {
all my actions here
}
so if everything goes well , i can access any variable from any action in my controller, however it doesnt work and i get an error message that says that the variable i'm trying to access is not defined.
but if i include the file inside the action, everything works perfect and i can access the variables.
i have no idea why including the file in the top of the controller doesnt seem to work.