24 lines
393 B
PHP
24 lines
393 B
PHP
<?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);
|
|
|
|
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>
|