1. <?
  2.  
  3. class TagManager
  4. {
  5. private $connection;
  6. private $h;
  7. private $u;
  8. private $p;
  9. private $db;
  10.  
  11. public function TagManager()
  12. {
  13. $this->h = "your_host";
  14. $this->u = "your_username";
  15. $this->p = "your_password";
  16. $this->db = "your_database_name";
  17. }
  18.  
  19. private function connect()
  20. {
  21. $this->connection = @mysql_connect($this->h, $this->u, $this->p) OR die(&#8217;Could not connect to MySQL: ’ . mysql_error());
  22. @mysql_select_db($this->db, $this->connection) OR die(&#8217;Could not select the database: ’ . mysql_error());
  23. }

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:
  1. $this->connection = @mysql_connect($this->h, $this->u, $this->p) OR die(&#8217;Could not connect to MySQL: ’ . mysql_error());

Co jest nie tak?