Porządki
This commit is contained in:
20
config/database.php
Normal file
20
config/database.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
// config/database.php
|
||||
|
||||
$serverName = '192.168.20.20';
|
||||
$connectionOptions = [
|
||||
'Database' => 'Gastro',
|
||||
'Uid' => 'sa',
|
||||
'PWD' => 'karczma!@#26',
|
||||
'CharacterSet' => 'UTF-8',
|
||||
];
|
||||
|
||||
$conn = sqlsrv_connect($serverName, $connectionOptions);
|
||||
|
||||
if (!$conn) {
|
||||
die(json_encode([
|
||||
'status' => 'error',
|
||||
'message' => 'Błąd połączenia z bazą danych.',
|
||||
'errors' => sqlsrv_errors()
|
||||
], JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
Reference in New Issue
Block a user