class AuctionHouse { var $maxLength, $connection; private $db_host; private $db_user; private $db_password; private $db_name; private $lim; private $template; /** * Constructor, executed when we make a new object. * * @return Object */ function _construct() {} function AuctionHouse() { $this->db_host='localhost'; $this->db_user='root'; $this->db_password=''; $this->db_name='d3'; $this->lim='20'; $this->template = 'templates/DisplayTemplate.php'; $this->trclass= ''; } function editItem($id) { $id = $_GET['id']; { $this->connect(); { $datadump = ''; foreach($health as $klucz => $nazwa) { { $datadump .= '<tr class="'.$trclass.'"><td>' . $nazwa . '</td><td><input type="text" name="'.$klucz.'" value="' . $row[$klucz] . '"/></td></tr>'; } } } require($this->template); // Show item with our template. $this->close(); return true; } else return false; // Not valid number }
Pobieram jako
require('../AuctionHouse.php'); $ah = new AuctionHouse(); $ah->editItem(4);
Błąd to Fatal error: Call to a member function editItem() on a non-object in C:\xampp\htdocs\tip\tooltip\cms\admin\editItemForm.php on line 47
Gdzie jest błąd?