Files
inventario_material/public_html/conexion.php
T
2019-06-11 13:54:09 -05:00

37 lines
742 B
PHP

<?php
/*
* conexion a viper
* */
$host = '132.248.80.194';
$user = 'usr_inv_material';
$pass = 'tint4sBond';
$dbname = 'kalinga_inventario_material';
$dsn = 'mysql:host=' . $host . ';dbname=' .$dbname;
try{
$conexion = new PDO($dsn,$user,$pass);
$conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$conexion->exec('SET CHARACTER SET utf8');
}catch(PDOException $e){
$error = "Error en la linea:" . $e->getLine(). "<br>";
$error = "Error: " . $e->getMessage() . "<br>";
echo $error;
}
/*
* conexion local
* */
/*
$mysqli = new mysqli("132.248.80.194",
"usr_inv_material",
"tint4sBond",
"P_orion_inventario_material");
*/
?>