0
Warum kann ich nicht globale Variable aus der Aktion von Zend_controller aufrufen?Warum in Zend v1 Zend_Controller nicht Global var aufrufen
Mein Code:
require_once 'config.ini.php';
print_r($dbConfig); // in this line work OK
class IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
//$this->_redirect("index/add");
global $dbConfig;
header("Location:index/add");
print_r($_GLOBAL);// in this line var is undefined, but if I call wrong name of var like $dbConfig1 - I see error.
Maby Zend - blockieren globalen Variablen?
Nein, es ist nicht zu arbeiten. Also mache ich es im Blick und arbeite auch nicht. Warum)? – yavafree
http://zend-framework-community.634137.n4.nabble.com/Allowing-global-variables-with-Zend-Framework-td643899.html - dieser Mann spricht auch über – yavafree
Ups, danke Sie haben Recht! Ich habe nicht gesehen, dass ich require_once in 2 Punkten benutze. Also nach der Verwendung der Anweisung requed - es ist Arbeit. Vielen Dank!!! – yavafree