Hi,
in einer index-Datei führe ich
	
aus. 
In der configuration.inc.php wird nur ein Array erzeugt.
	
Beim ersten print_r ( $system ) wird der Array ordnungsgemäß ausgegeben. Beim zweiten im Konstruktor allerdings, wird er nichtmehr ausgeprintet. 
Hat jemand einen Tipp warum der Fehler besteht ?
					in einer index-Datei führe ich
PHP-Code:
	
	
require_once 'xxx/files/inc/configuration.inc.php';
require_once 'xxx/files/inc/applikation.php'; 
In der configuration.inc.php wird nur ein Array erzeugt.
PHP-Code:
	
	
<?
class xxx {
    
    var $config;
        
    function xxx() {
        
        global $system;
        
        echo "TEST" ;
        
        print_r ( $system ) ;
        
        echo "TEST2" ;
        $this->config = $system;
        
        if( $this->config["DB_Connect"] == TRUE ) $this->class_new( "db" );
        
    }
    
    
    function class_new ( $phpklassen ) {
        
        global $system;
        
        $klassen = explode( ",", $phpklassen );
        
        if( is_array( $klassen ) ) {
            
            foreach( $klassen as $klasse ) {
                
                if( !is_object( $this->$klasse ) ) {
                    
                    include_once($this->config['class_dir'] . "/class.".$klasse.".php");
                       
                       $this->$klasse = new $klasse;
                      
                   }
               }
          }
    }
    
print_r ( $system ) ;
$xxx = new xxx;
$xxx->class_new( 'xxxsmarty' );
?>
Hat jemand einen Tipp warum der Fehler besteht ?
 
          
 .
 .
Kommentar