You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
356 B
19 lines
356 B
<?php
|
|
|
|
use API\script\Config\Connection;
|
|
|
|
function connect()
|
|
{
|
|
$dsn = "mysql:host=localhost;dbname=formulaire;charset=utf8";
|
|
$login = "root";
|
|
|
|
try {
|
|
$connection = new Connection($dsn, $login, "root");
|
|
} catch (PDOException $e) {
|
|
http_response_code(404);
|
|
return http_response_code();
|
|
}
|
|
|
|
return $connection;
|
|
}
|