Skip to content
Snippets Groups Projects
Commit b91c4d26 authored by D4rkHeart's avatar D4rkHeart
Browse files

[Feat] 12 factored config.php and removed it from the gitignore

- The config.php is now GENERIC !
parent 5b7dab11
No related branches found
No related tags found
1 merge request!912 factored the form application and the DB connection
...@@ -3,7 +3,6 @@ aspnet_client/ ...@@ -3,7 +3,6 @@ aspnet_client/
robots.txt robots.txt
web.config web.config
ndphpinfo.php ndphpinfo.php
configs/config.php
DB DB
DB0 DB0
data data
......
<?php
if (count(get_included_files()) == 1) exit("Direct access not permitted.");
// Change with docker / local / prod
define('ENVIRONMENT', getenv('ENVIRONMENT') ? getenv('ENVIRONMENT') : 'docker');
$CONFIG = array(
'FILESERVERPATH' => getenv('FILESERVERATH'),
'SENDEMAILS' => getenv('SENDMAILS')=="true" ? true : false,
'MAIL_FROM' => getenv('MAIL_FROM'),
'MAIL_CONTACT' => getenv('MAIL_CONTACT'),
'MAIL_REPLYTO' => getenv('MAIL_REPLYTO'),
'DB_DATABASE' => getenv('DB_DATABASE'),
'DB_USERNAME' => getenv('DB_USERNAME'),
'DB_PASSWORD' => getenv('DB_PASSWORD'),
'DB_HOST' => getenv('DB_HOST'),
'DB_PORT' => getenv('DB_PORT'),
);
if (!isset($_SESSION)) { session_start(); }
if (ENVIRONMENT !== 'prod') {
ini_set("display_errors", 1);
error_reporting(E_ALL);
} else {
ini_set("display_errors", 0);
error_reporting(0);
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment