Answers for "view a pdf file in the browser using the php header function"

PHP
0

view a pdf file in the browser using the php header function

$file = 'headerPdfFile.pdf';

$filename = 'IamPdfFile.pdf';
  
// Header content type
header('Content-type: application/pdf');
  
header('Content-Disposition: inline; filename="' . $filename . '"');  
  
// Read the file
@readfile($file);
Posted by: Guest on October-03-2021

Code answers related to "view a pdf file in the browser using the php header function"

Browse Popular Code Answers by Language