Server IP : 162.240.98.243 / Your IP : 18.117.99.152 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/btiyawmy/public_html/ |
Upload File : |
<?php class DBManager { public function connect() { //server with default setting (user 'root' with no password) */ if(!defined('DB_SERVER')) define('DB_SERVER', 'localhost'); if(!defined('DB_USERNAME')) define('DB_USERNAME', 'btiyawmy_software'); if(!defined('DB_PASSWORD')) define('DB_PASSWORD', '@#admin@#'); if(!defined('DB_NAME')) define('DB_NAME', 'btiyawmy_software'); /* Attempt to connect to MySQL database */ $link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); return $link; // Check connection if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); return null; } } public function close($link) { /* Attempt to connect to MySQL database */ if($link === true) { mysqli_close($link); die("ERROR: Close Database Connection. " . mysqli_close_error()); return null; } } } ?>