diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-11 12:35:47 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-11 12:35:47 +0100 |
commit | 19985dbb8c0aa66dc4bf7905abc1148de909097d (patch) | |
tree | 2cd5a5d20d7e80fc2a51adf60d838d8a2c40999e /main/survey/app/config.php | |
download | 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.gz 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.bz2 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.lz 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.xz 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.zst 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.zip |
Diffstat (limited to '')
-rw-r--r-- | main/survey/app/config.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/main/survey/app/config.php b/main/survey/app/config.php new file mode 100644 index 0000000..5605176 --- /dev/null +++ b/main/survey/app/config.php @@ -0,0 +1,49 @@ +<?php
+/***************************************
+ * Description:
+ * Autor: Robert Šmalc
+ * Created date: 22.01.2016
+ *****************************************/
+
+/**
+ * Nastavimo vrsta okolja ali gre za produkcijo ali development/debugingp
+ * DEV: - prikažemo vse errorje
+ * - izpis spremenljiv z ukazom d() ali ddd()
+ * - blackscreen error display
+ */
+global $site_url;
+if (in_array($site_url, [
+ 'http://localhost/',
+ 'http://1ka.dev/',
+ 'http://1ka-framework.dev/'
+])) {
+ define('ENVIRONMENT', 'dev');
+} else {
+ define('ENVIRONMENT', 'production');
+}
+
+// Error reporting
+if (/*ENVIRONMENT == 'dev' ||*/ isDebug()) {
+ error_reporting(E_ALL);
+ ini_set("display_errors", 1);
+
+ //ERROR blackscreen prikaz
+ if (class_exists('\Whoops\Run)')) {
+ $whoops = new \Whoops\Run;
+ $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
+ $whoops->register();
+ }
+
+} else {
+ error_reporting(0);
+ ini_set("display_errors", 0);
+}
+
+
+//DB connection
+define('DB_TYPE', 'mysql');
+define('DB_HOST', $mysql_server);
+define('DB_NAME', $mysql_database_name);
+define('DB_USER', $mysql_username);
+define('DB_PASS', $mysql_password);
+
|