Skip to content

Instantly share code, notes, and snippets.

@wokamoto

wokamoto/gist:9066757

Last active Aug 29, 2015
Embed
What would you like to do?
<?php
$mime_type = 'application/pdf';
$file_path = '/path/to/pdf';
header('Content-Disposition: inline; filename="'.basename($file_path).'"');
header('Content-Length: '.filesize($file_path));
header('Content-Type: '.$mime_type);
readfile($file_path);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.