-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
33 lines (29 loc) · 725 Bytes
/
config.php
File metadata and controls
33 lines (29 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
$host='localhost';
$user='vitality_raspkit';
$password='xh&vS?2*';
$db='vitality_raspkit';
$options = [
'cost' => 11,
'salt' => md5("salt"),
];
$mysqli = new mysqli("$host", "$user", "$password", "$db");
if ($mysqli->connect_error) {
die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);
}
if (!$mysqli->real_connect($host, $user, $password, $db)) {
die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);
}
else
{
//echo "OK!";
}
function def($text,$linksql = false) {
$result = strip_tags($text);
$result = htmlspecialchars($result);
if($linksql)
$result = mysqli_real_escape_string ($linksql, $result);
return $result;
}
session_start();
?>