di file include sering jadi penyebab broken image) if (!function_exists('private_clear_output_buffers')) { function private_clear_output_buffers() { while (ob_get_level() > 0) { @ob_end_clean(); } } } // Sajikan file private (image/pdf) dengan header bersih if (!function_exists('private_serve_file')) { function private_serve_file($path, $mime, $download_name = '') { private_clear_output_buffers(); header('Content-Type: ' . $mime); header('Content-Length: ' . filesize($path)); header('Cache-Control: private, max-age=3600'); header('X-Content-Type-Options: nosniff'); if ($download_name !== '') { header('Content-Disposition: inline; filename="' . basename($download_name) . '"'); } readfile($path); exit; } } // ======================================================= // 8. OPTIONAL: MATIKAN ERROR DETAIL DI PRODUCTION // ======================================================= // Untuk production sebaiknya 0 // Untuk debugging sementara bisa ganti menjadi 1 ini_set('display_errors', 0); error_reporting(E_ALL); OSS KOPMENKAR

OSS KOPMENKAR