Created JWT Authentication #25
21
dist/api/config.php
vendored
21
dist/api/config.php
vendored
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
//////////// Config file /////////////////////
|
||||
/// Used for storing important information ///
|
||||
/// such as passwords, usernames etc. ///
|
||||
//////////////////////////////////////////////
|
||||
|
||||
function dbConn(): PDO|string
|
||||
{
|
||||
$host = "localhost";
|
||||
$dbName = "u987021215_cms";
|
||||
$username = "u987021215_rodude123";
|
||||
$password = "pFHS5qKhkyaDumgf";
|
||||
try
|
||||
{
|
||||
return new PDO("mysql:host=$host;dbname=$dbName", $username, $password);
|
||||
}
|
||||
catch (PDOException $e)
|
||||
{
|
||||
return "Connection failed: " . $e->getMessage();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user