Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $link = mysqli_connect("localhost", "my_user", "my_password", "world");
- /* controllo connection */
- if (mysqli_connect_errno()) {
- printf("Connessione fallita : %s\n", mysqli_connect_error());
- exit();
- }
- /* controllo se il server mysql è avviato*/
- if (mysqli_ping($link)) {
- printf ("Server mysql ok!\n");
- } else {
- printf ("Errore: %s\n", mysqli_error($link));
- }
- /* chiudo connessione */
- mysqli_close($link);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement