/favicon.php // Determine the favicon file to serve (prefer .ico then png) $base = __DIR__ . '/assets/img'; $ico = $base . '/favicon.ico'; $png = $base . '/favicon.png'; if (file_exists($ico)) { header('Content-Type: image/x-icon'); header('Content-Length: ' . filesize($ico)); readfile($ico); exit; } if (file_exists($png)) { header('Content-Type: image/png'); header('Content-Length: ' . filesize($png)); readfile($png); exit; } // Fallback: 1x1 transparent GIF header('Content-Type: image/gif'); echo base64_decode('R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=='); exit;