Advertisement
hercioneto

PW1 acessa

Nov 16th, 2016
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2. /* Arquivo acessa.php salvo na pasta arearestrita */
  3.  
  4. //variaveis para conexão
  5. $server = 'localhost'; //servidor
  6. $user = 'root'; //usuario
  7. $pass = ''; //senha
  8. $database = 'pw1'; //nome da base
  9. // Conecta-se ao banco de dados MySQL
  10. $conexao = new mysqli($server, $user, $pass, $database);
  11. // Caso algo tenha dado errado, exibe uma mensagem de erro
  12. if (mysqli_connect_errno())
  13.     trigger_error(mysqli_connect_error());
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement