adhieresthenes

Config DB

Sep 4th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.51 KB | None | 0 0
  1. <?php
  2. /**
  3.  * These are the database login details
  4.  */  
  5. define("HOST", "103.253.212.34");     // The host you want to connect to.
  6. define("USER", "bale1038_erpjakarta");    // The database username.
  7. define("PASSWORD", "12345678bC");    // The database password.
  8. //define("DATABASE", "db_erp_web");    // The database name in localhost.
  9. define("DATABASE", "bale1038_erp_user");    // The database name.
  10.  
  11. define("CAN_REGISTER", "any");
  12. define("DEFAULT_ROLE", "member");
  13.  
  14. define("SECURE", FALSE);    // FOR DEVELOPMENT ONLY!!!!
  15.  
  16. //Database to access OBU perso
  17. //define("HOST_PERSO", "10.255.255.100");     // The host you want to connect to.
  18. define("HOST_PERSO", "103.253.212.34");
  19. define("USER_PERSO", "bale1038_erpjakarta");    // The database username.
  20. //define("PASSWORD_PERSO", "erpjakarta");    // The database password.
  21. define("PASSWORD_PERSO", "12345678bC");
  22. //define("DATABASE_PERSO", "erp");    // The database name.
  23. define("DATABASE_PERSO", "bale1038_erp_gantry");
  24.  
  25. // Get directory address of file config.php
  26. define('ABSPATH', dirname(__FILE__).'/');
  27. //Internal DB Connections
  28. $mysqli = new mysqli(HOST, USER,PASSWORD, DATABASE);
  29. if (mysqli_connect_errno()) {
  30.     printf("Error Connection\n", mysqli_connect_error());
  31.     exit;
  32. }
  33. $mysqli_perso = new mysqli(HOST_PERSO, USER_PERSO, PASSWORD_PERSO, DATABASE_PERSO);
  34. if (mysqli_connect_errno()) {
  35.     printf("Error Connection\n", mysqli_connect_error());
  36.     exit;
  37. }
  38.  
  39. //Call file path direction
  40. //require ABSPATH. 'Function_connect.php';
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment