-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.php
More file actions
30 lines (23 loc) · 791 Bytes
/
config.example.php
File metadata and controls
30 lines (23 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
// Database Configuration
define('DB_HOST', 'localhost');
define('DB_NAME', 'projectify');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_PORT', '3306');
// Application Configuration
define('APP_NAME', 'Projectify');
// Auto-detect protocol and host (Do not change unless using a reverse proxy)
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";
$host = $_SERVER['HTTP_HOST'];
$base_url = "http://localhost/pms"; // Fallback
if ($host !== 'localhost' && $host !== '127.0.0.1') {
$base_url = $protocol . "://" . $host;
}
define('BASE_URL', $base_url);
// Debug Mode (Set to false in production)
define('DEBUG_MODE', true);
// Helper to get full URL
function url($path = '') {
return BASE_URL . '/' . ltrim($path, '/');
}