Configuration file
This commit is contained in:
parent
0e709efcae
commit
98fff1b107
4
blomzt/config.ini
Normal file
4
blomzt/config.ini
Normal file
@ -0,0 +1,4 @@
|
||||
[database]
|
||||
db_host = localhost
|
||||
db_user = root
|
||||
db_password =
|
@ -1,7 +0,0 @@
|
||||
<? php
|
||||
|
||||
return array(
|
||||
'db_host' => 'localhost'
|
||||
'db_username' => 'root'
|
||||
'db_password' => 'password'
|
||||
);
|
@ -1,6 +1,14 @@
|
||||
<?php
|
||||
|
||||
$config = include('config.php');
|
||||
$config = parse_ini_file('config.ini');
|
||||
|
||||
$conn = mysqli_connect($config['db_host'], $config['db_user'], $config['db_password'], 'blomzt');
|
||||
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@ -8,17 +16,9 @@ $config = include('config.php');
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>CSGO skin database</title>
|
||||
<title>Blomzt</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$con = mysqli_connect($config.db_host, $config.db_username, $config.db_password);
|
||||
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
echo "Connection succeded";
|
||||
?>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user