feat: ✨ [first attempt at using MySQLi in the docker dev env]
This commit is contained in:
parent
472ec10496
commit
1862ccbbb6
5 changed files with 21 additions and 2 deletions
11
router.php
11
router.php
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue