Moin
Folgendes Problem, ich bekomme immer folgende Fehlermeldung.
Fatal error: Call to a member function connect() on a non-object in D:\Programme\xampp\htdocs\darkssite.eu\cms\includes\load.php on line 10
Meine load.php.
PHP
		
					
				<?php
  class load {
    var $file;
    var $mysql;
    function online() {
      if(file_exists('includes/mysql_config.php')) {
        global $mysql, $save;
        $save->installed = true;
        $this->file = file('includes/mysql_config.php');
        $this->mysql = $mysql->connect($this->file['1'], $this->file['2'], $this->file['3'], $this->file['4']);
        if($this->mysql == true) {
          $this->mysql = $mysql->select('*', $this->file['5'].'options', '1', $this->file['6'], '', 'arr');
          if(!empty($this->mysql)) {
            $save->template = $this->mysql['template'];
            $save->templ = $this->mysql['template'];
            $save->version = $this->mysql['version'];
            $save->links = $this->mysql['links'];
            $save->path = $this->mysql['path'];
            $save->lang = $this->mysql['lang']; }
          else {
            $save->error .= $save->date.' load.php: Couldn\'t get any information about the options.
\n'; }}
        else {
          $save->error .= $save->date.' load.php: Order to connect mysql failed.
\n'; }}}}
?>Die index, in die die Datein includiert wird.
PHP
		
					
				<?php
  ini_set ('error_reporting', E_ALL);
  include("includes/save.php");
  include("includes/parser.php");
  include("includes/mysql.php");
  include("includes/load.php");
  if(file_exists("install.php")) include("install.php");
  class online {
    function online() {
    global $load, $parser;
      //
      $load->online();
      $parser->online();
     } 
  }
  //#/
  $save = new save;
  $parser = new parser;
  $load = new load;
  $mysql = new mysql;
  $save->set();
  //
  $online->online();
?>Warscheinlich ist der Fehler offensichtlich, jedoch komm ich nicht drauf.
Ich versteh einfach nicht, warum die Meldung kommt.
Tests haben gezeigt, das es an der Zeile
$this->mysql = $mysql->connect($this->file['1'], $this->file['2'], $this->file['3'], $this->file['4']);
auftritt, jedoch ist die nicht verständlich, da $mysql eigentlich sowohl definiert als auch globalisiert wurde.
 
		 
		
		
	