napisalem cos takiego:
PLIK CLASS.PHP: (wycinek)
class Travel
{
var $id;
var $to_x;
var $to_y;
var $speed;
var $type;
var $gobliny;
var $me;
var $player_id;
var $end_s;
var $end_m;
var $end_h;
var $koniec_podrozy;
function Travel($pID)
{
$statis = $db -> Execute("SELECT * FROM travel WHERE player_id=".$pID);
$this -> id = $statis -> fields['id'];
$this -> to_x = $statis -> fields['to_x'];
$this -> to_y = $statis -> fields['to_y'];
$this -> speed = $statis -> fields['speed'];
$this -> type = $statis -> fields['type'];
$this -> gobliny = $statis -> fields['gobliny'];
$this -> me = $statis -> fields['me'];
$this -> player_id = $statis -> fields['player_id'];
$this -> end_s = $statis -> fields['end_s'];
$this -> end_m = $statis -> fields['end_m'];
$this -> end_h = $statis -> fields['end_h'];
$this -> koniec_podrozy = $statis -> fields['koniec_podrozy'];
$statis -> Close();
}
function statis($statis)
{
foreach ($statis as $valuee)
{
$arrstatis[$valuee] = $this -> $valuee;
}
return $arrstatis;
}
}
plik CLASS.PHP includuje do innego pliku i daje:
$travel = new Travel($statis -> fields['id']);
nie mam pojęcia co jest źle ale pojawia mi sie błąd:
Cytat
Fatal error: Call to a member function Close() on a non-object in /home/accounts_a/arsanael/public_html/eportal/class.php on line 269
jeszcze wspomne że 269 linijka to ta:
$statis -> Close();
nie mam pojecia co jest źle ;/ prosze o pomoc