Created
August 25, 2017 21:27
-
-
Save marcialsoto/d59bfb7ade1c583ca0c998d985a5ec31 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| $mysqli = new mysqli("66.147.244.210", "incatra5_msoto", "#Hacker147*", "incatr$ | |
| //$mysqli = new mysqli("localhost", "minam", "minam", "educacion"); | |
| /* comprobar la conexión */ | |
| if ($mysqli->connect_errno) { | |
| printf("Conexión fallida: %s\n", $mysqli->connect_error); | |
| exit(); | |
| } | |
| /* comprobar si el servidor sigue vivo */ | |
| if ($mysqli->ping()) { | |
| printf ("¡La conexión está bien!\n"); | |
| } else { | |
| printf ("Error: %s\n", $mysqli->error); | |
| } | |
| /* cerrar la conexión */ | |
| $mysqli->close(); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment