Restructure MVC into public/src layout
Co-authored-by: LeOSW42 <673670+LeOSW42@users.noreply.github.com>
This commit is contained in:
1 parent
1be6b7ff0c
commit
f617ecb350
135 files changed
+75
-63
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
function sql_connect() {
|
||||
global $config;
|
||||
|
||||
$connection = "host=".$config['SQL_host']
|
||||
." dbname=".$config['SQL_db']
|
||||
." user=".$config['SQL_user']
|
||||
." password=".$config['SQL_pass'];
|
||||
|
||||
$con = pg_connect($connection);
|
||||
if (!$con) {
|
||||
$error = error_get_last();
|
||||
$message = $error && isset($error['message']) ? $error['message'] : "unknown error";
|
||||
die("Could not connect to server: ".$message."\n");
|
||||
}
|
||||
|
||||
return $con;
|
||||
}
|
||||
Reference in new issue
Block a user