Moin!
Ich habe ein Problem mit der allesits beliebten Fehlermeldung "Call to a member function ... on a non-object in /Users/.../.../.../inc.functions.php.
Die Struktur ist wie folgt:
index.php5:
	
inc.sessions.php5
	
inc.classes.php5:
	
class.configuration.php5:
	
inc.functions.php5:
	
Ich hab eigentlich auch nicht erwartet, dass das so funktioniert, aber die Frage ist: wie bastel ich das hin, dass das hinhaut?
Ich hab jetzt schon 2 stunden gesucht, aber das richtige noch nicht gefunden...
Jemand einen Vorschlag? Schönen Dank schon mal im Voraus! :-)
Gruß,
Tiberius
					Ich habe ein Problem mit der allesits beliebten Fehlermeldung "Call to a member function ... on a non-object in /Users/.../.../.../inc.functions.php.
Die Struktur ist wie folgt:
index.php5:
PHP Code:
	
	
...
include( 'inc.sessions.php5' );
... 
inc.sessions.php5
PHP Code:
	
	
...
include( 'inc.classes.php5' );
$configuration = new configuration();
include( 'inc.functions.php5' );
... 
PHP Code:
	
	
...
require_once( 'class.configuration.php5' );
... 
PHP Code:
	
	
class configuration
{
  public function __construct()
  {
    $this->get_data();
  }
  function get_data()
  {
    // [... do something ...]
  }
} 
PHP Code:
	
	
...
function test1()
{
  $tmp = $configuration->get_data();
  // und hier haut das nicht hin :-(
}
... 
Ich hab jetzt schon 2 stunden gesucht, aber das richtige noch nicht gefunden...
Jemand einen Vorschlag? Schönen Dank schon mal im Voraus! :-)
Gruß,
Tiberius
 
          
Comment