<? class TagManager { private $connection; private $h; private $u; private $p; private $db; public function TagManager() { $this->h = "your_host"; $this->u = "your_username"; $this->p = "your_password"; $this->db = "your_database_name"; } private function connect() { $this->connection = @mysql_connect($this->h, $this->u, $this->p) OR die(’Could not connect to MySQL: ’ . mysql_error()); @mysql_select_db($this->db, $this->connection) OR die(’Could not select the database: ’ . mysql_error()); }
W kawałku tego kodu (połączenie) jest błąd:
Cytat
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\tagi\classes\TagManager.class.php on line 21
linijka 21 to:
$this->connection = @mysql_connect($this->h, $this->u, $this->p) OR die(’Could not connect to MySQL: ’ . mysql_error());
Co jest nie tak?