[英]How can php not execute neither 'then' nor 'else' clauses of 'if'?
[英]i have open pdf file in php and how can secure it ? no one can neither download nor print it
我通過php中的localhost運行PDF文件,瀏覽器中有一個打印PDF的選項,但我不希望它被打印。 這是我的代碼:
header('Content-type: application/pdf');
readfile('The C# 4.0 complete reference.pdf');
die();
請幫助我
試試這個代碼
<?php
header("Content-type:application/pdf");
// It will be called downloaded.pdf
header("Content-Disposition:attachment;filename='downloaded.pdf'");
// The PDF source is in original.pdf
readfile("original.pdf");
?>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.