- Move 45 debug/test files from root to organized scripts/ directories - Secure public/ directory by removing debug files (security improvement) - Create structured scripts organization: • scripts/debug/ (20 files) - Framework debugging tools • scripts/test/ (18 files) - Test and validation scripts • scripts/maintenance/ (5 files) - Maintenance utilities • scripts/dev/ (2 files) - Development tools Security improvements: - Removed all debug/test files from public/ directory - Only production files remain: index.php, health.php Root directory cleanup: - Reduced from 47 to 2 PHP files in root - Only essential production files: console.php, worker.php This improves: ✅ Security (no debug code in public/) ✅ Organization (clear separation of concerns) ✅ Maintainability (easy to find and manage scripts) ✅ Professional structure (clean root directory)
27 lines
850 B
PHP
27 lines
850 B
PHP
<?php
|
|
// Simple production test endpoint
|
|
declare(strict_types=1);
|
|
|
|
// Load environment
|
|
$envFile = __DIR__ . '/../.env';
|
|
if (file_exists($envFile)) {
|
|
$lines = file($envFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
|
foreach ($lines as $line) {
|
|
if (strpos($line, '#') === 0) continue;
|
|
if (strpos($line, '=') !== false) {
|
|
[$key, $value] = explode('=', $line, 2);
|
|
$_ENV[trim($key)] = trim($value);
|
|
}
|
|
}
|
|
}
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
echo json_encode([
|
|
'status' => 'production-test',
|
|
'app_env' => $_ENV['APP_ENV'] ?? 'not-set',
|
|
'app_debug' => $_ENV['APP_DEBUG'] ?? 'not-set',
|
|
'analytics_track_performance' => $_ENV['ANALYTICS_TRACK_PERFORMANCE'] ?? 'not-set',
|
|
'xdebug_mode' => $_ENV['XDEBUG_MODE'] ?? 'not-set',
|
|
'timestamp' => date('Y-m-d H:i:s')
|
|
]); |