Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/11/2010, 18:05
Avatar de aguila_393
aguila_393
 
Fecha de Ingreso: septiembre-2007
Ubicación: Argentina
Mensajes: 406
Antigüedad: 16 años, 7 meses
Puntos: 1
Problema con script en PHP

Bueno tengo el siguiente script:
Código PHP:
Ver original
  1. <?php
  2.  
  3. class db
  4. {
  5.  
  6. private $servidor;
  7. private $usuario;
  8. private $pass;
  9. private $base_datos;
  10. private $descriptor;
  11.  
  12. function __construct($servidor = "mysql8.000webhost.com",$usuario = "a7863285_xasd",$pass = "xxxxxx",$base_datos = "a7863285_cManage")
  13. {
  14. $this->servidor = $servidor;
  15. $this->usuario = $usuario;
  16. $this->pass = $pass;
  17. $this->base_datos = $base_datos;
  18. $this->conectar_base_datos();
  19.  
  20. }
  21. prívate function conectar_base_datos()   //ERROR EN ESTA LINEA
  22. {
  23. $this->descriptor = mysql__connect($this->servidor,$this-
  24. >usuario,$this->pass) ;
  25. mysql_select_db($this->base_datos,$this->descriptor);
  26. }
  27. public function consulta($consulta)
  28. {
  29. $this->resultado = mysql_query($consulta,$this->descriptor) ;
  30. }
  31. public function utf ()
  32. {
  33. mysql_query ("SET NAMES 'utf8'");
  34. }
  35. }
  36. ?>

Y el error es el siguiente:

Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /home/a7863285/public_html/mysql.php on line 21

Alguien tiene idea que es lo que hay mal o como solucionarlo?

Gracias.