Created
February 12, 2018 21:59
-
-
Save parzibyte/7b6b00a3849a3cc592670f4ad9e9203f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$contraseña = ""; | |
$usuario = "root"; | |
$nombre_base_de_datos = "pruebas"; | |
try{ | |
$base_de_datos = new PDO('mysql:host=localhost;dbname=' . $nombre_base_de_datos, $usuario, $contraseña); | |
}catch(Exception $e){ | |
echo "Ocurrió algo con la base de datos: " . $e->getMessage(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment