Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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);
Source by www.quizcure.com #
 
PREVIOUS NEXT
Tagged: #view #pdf #file #browser #php #header #function
ADD COMMENT
Topic
Name
2+1 =