feat: [first attempt at using MySQLi in the docker dev env]

This commit is contained in:
David Bailey 2023-10-16 16:15:24 +02:00
parent 472ec10496
commit 1862ccbbb6
5 changed files with 21 additions and 2 deletions

View file

@ -2,6 +2,17 @@
require_once 'vendor/autoload.php';
$sql = mysqli_connect('mysql', 'root', 'example', 'mysql');
if (!$sql)
{
echo 'Connection failed<br>';
echo 'Error number: ' . mysqli_connect_errno() . '<br>';
echo 'Error message: ' . mysqli_connect_error() . '<br>';
die();
}
$loader = new \Twig\Loader\FilesystemLoader(['./templates', './user_content']);
$twig = new \Twig\Environment($loader,['debug' => true]);