config.php 839 Bytes
Newer Older
Zohten's avatar
Zohten committed
1
<?php
Zohten's avatar
Zohten committed
2 3 4 5 6
define('DB_HOST', '127.0.0.1');
define('DB_PORT', 3306);
define('DB_DATABASE', 'dbtest');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
Zohten's avatar
Zohten committed
7 8 9 10

// define('__DEBUG', false);
define('__DEBUG', true);

Zohten's avatar
Zohten committed
11 12
define('JWT_BACKEND_KEY', '6d8HbcZndVGNAbo4Ih1TGaKcuA1y2BKs-I5CmP');
define('JWT_ISSUER', $_SERVER['HTTP_HOST'] . $_SERVER['CONTEXT_PREFIX']);
Zohten's avatar
Zohten committed
13 14 15 16 17 18


// ================================================================================
// Debug utilities
// ================================================================================

Zohten's avatar
Zohten committed
19
if (__DEBUG) {
Zohten's avatar
Zohten committed
20 21 22 23 24 25 26
    error_reporting(E_ALL);
    ini_set("display_errors", E_ALL);
} else {
    error_reporting(0);
    ini_set("display_errors", 0);
}

Zohten's avatar
Zohten committed
27 28 29
function myLog($msg)
{
    if (__DEBUG) {
Zohten's avatar
Zohten committed
30 31 32 33
        echo $msg;
    }
}

Zohten's avatar
Zohten committed
34 35 36
function myDump($var)
{
    if (__DEBUG) {
Zohten's avatar
Zohten committed
37 38
        var_dump($var);
    }
Zohten's avatar
Zohten committed
39
}