Example #1
0
 public function conectar()
 {
     $conexion = new CConexion();
     $this->hostname_conn = $conexion->obteneHostName();
     $this->database_conn = $conexion->obteneDataBase();
     $this->username_conn = $conexion->obteneUserName();
     $this->password_conn = $conexion->obtenePassword();
     $this->conn = mysql_pconnect($this->hostname_conn, $this->username_conn, $this->password_conn) or trigger_error(mysql_error(), E_USER_ERROR);
 }
Example #2
0
 public function comprobarTipoVariableYredireccionar($variable)
 {
     $this->conectar();
     $objConexion = new CConexion();
     if (ctype_digit($variable)) {
         //echo "numero";
     } else {
         header("Location: " . $objConexion->obteneUrlBaseSitio());
         //echo "cadena";
     }
 }
Example #3
0
 public function obteneUrlBaseSitio()
 {
     $objeto = new CConexion();
     return $objeto->obteneUrlBaseSitio();
 }