-
Notifications
You must be signed in to change notification settings - Fork 0
/
_cred.php
24 lines (22 loc) · 839 Bytes
/
_cred.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
function handleError($errno, $errstr) {
echo "<div class='alert alert-warning'><b>The application has encountered an error :(</b><br>
Don't worry, its just a configuration error.
We are working on it ASAP.</div>";
die();
}
if($_SERVER['HTTP_HOST']==='localhost'){
$conn = new mysqli('localhost','root','','malware_repository');
}
else if($_SERVER['HTTP_HOST']==='malware.cryosoft.co.ke'){
//place server config here for external hosting
$conn = new mysqli('den1.mysql1.gear.host','malware','Ei4tEVM!2?j6','malware');
}
else{
//place server config here for external hosting
$conn = new mysqli('localhost','root','','malware_repository');
}
$conn->set_charset('utf8mb4');
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}