PHP - Local/Remote Connection Strings


/ Published in: PHP
Save to your folder(s)

Local/Remote Connection Strings (Dados para conexão local e remota)


Copy this code and paste it in your HTML
  1. if ($_SERVER['REMOTE_ADDR'] !== '127.0.0.1'){
  2. $server = "localhost";
  3. $port ="3306";
  4. $database = "Test";
  5. $user = "user";
  6. $password = "123Change";
  7. } else {
  8. $server = "localhost";
  9. $port ="3385";
  10. $banco = "Test";
  11. $user = "root";
  12. $senha = "";
  13. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.