Social-Network/index.php

24 lines
393 B
PHP
Raw Normal View History

2024-01-18 21:47:19 +00:00
<?php
$env = parse_ini_file('.env');
$host = $env['DB_HOST'];
$user = $env['DB_USER'];
$pass = $env['DB_PASS'];
$db = $env['DB_NAME'];
$con = mysqli_connect($host, $user, $pass, $db);
2024-01-18 21:47:19 +00:00
if(mysqli_connect_errno()) {
echo "Failed to connect to database: " . mysqli_connect_errno();
}
?>
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>