Part on Enviroments finished

This commit is contained in:
Patryk Hegenberg 2022-12-13 18:04:25 +01:00
parent 57abb48e63
commit 8c7ac2df36
3 changed files with 17 additions and 7 deletions

View file

@ -2,8 +2,10 @@
require 'functions.php';
require 'Database.php';
//require 'router.php';
$db = new Database();
$username = 'appUser';
$password = 'password';
$config = require('config.php');
$db = new Database($config['database'], $username, $password);
$posts = $db->query("SELECT * FROM posts")->fetchAll(PDO::FETCH_ASSOC);
dd($posts);