Skip to content

Instantly share code, notes, and snippets.

@steppat
Created February 22, 2019 19:26
Show Gist options
  • Save steppat/dcbbb828efaec152e9bbe460ab2d2634 to your computer and use it in GitHub Desktop.
Save steppat/dcbbb828efaec152e9bbe460ab2d2634 to your computer and use it in GitHub Desktop.
Teste conexao PHP MySQL
<?php
echo "Testando conexao <br /> <br />";
$servername = "192.168.1.24";
$username = "phpuser";
$password = "pass";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Conexão falhou: " . $conn->connect_error);
}
echo "Connetado com sucesso";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment