2022-09-19 09:31:35 +07:00
|
|
|
<?php
|
2024-07-29 09:06:27 +07:00
|
|
|
|
2024-10-23 14:59:27 +07:00
|
|
|
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ||
|
|
|
|
(isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)) ? "https://" : "http://";
|
|
|
|
|
|
|
|
// Check if HTTP_HOST is set, otherwise use a default value or SERVER_NAME
|
|
|
|
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost');
|
|
|
|
|
2024-07-21 10:02:36 +01:00
|
|
|
$baseDir = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/\\');
|
|
|
|
define('APP_URL', $protocol . $host . $baseDir);
|
2024-07-29 09:06:27 +07:00
|
|
|
|
2024-10-23 14:59:27 +07:00
|
|
|
|
2024-07-21 10:02:36 +01:00
|
|
|
$_app_stage = 'Live'; # Do not change this
|
|
|
|
|
2024-07-29 09:06:27 +07:00
|
|
|
$db_host = "localhost"; # Database Host
|
|
|
|
$db_port = ""; # Database Port. Keep it blank if you are un sure.
|
|
|
|
$db_user = "root"; # Database Username
|
|
|
|
$db_pass = ""; # Database Password
|
|
|
|
$db_name = "phpnuxbill"; # Database Name
|
|
|
|
|
2024-07-21 10:02:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//error reporting
|
|
|
|
if($_app_stage!='Live'){
|
|
|
|
error_reporting(E_ERROR);
|
|
|
|
ini_set('display_errors', 1);
|
|
|
|
ini_set('display_startup_errors', 1);
|
|
|
|
}else{
|
|
|
|
error_reporting(E_ERROR);
|
|
|
|
ini_set('display_errors', 0);
|
|
|
|
ini_set('display_startup_errors', 0);
|
|
|
|
}
|