📜  无需使用 codeigniter 下载即可在线查看 pdf 文件 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:26.645000             🧑  作者: Mango

代码示例1
header("Content-Length: " . filesize ('theme/assets/pdf/ci.pdf' ) ); 
header("Content-type: application/pdf"); 
header("Content-disposition: inline;     
filename=".basename('theme/assets/pdf/ci.pdf'));
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
$filepath = readfile('theme/assets/pdf/ci.pdf');