Send file to browser

send_file_to_browser –– Send file to browser.

Description
void send_file_to_browser ( $attachment, $upload_dir , $category ) Deliver a file to the browser.

Return Values
Void

Example #1
Basic usage example. // Determine the 'presenting'-method if ($download_mode == PHYSICAL_LINK) {   // This presenting method should no longer be used if (!@is_dir($phpbb_root_path. $config['upload_path'])) {       trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']); }

redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']); file_gc; } else {   send_file_to_browser($attachment, $config['upload_path'], $display_cat); file_gc; }