Some browsers install the PDF opener associated to the browser, so the direct way to write the PDF path is to open the PDF instead of the download, below I say if let them just download, not browse.
Create a PHP file
Copy the Code code as follows:
$file = $_get[' file '];
$arr = explode ('/', $file);
Header (' content-type:application/pdf ');
Header (' content-disposition:attachment; Filename= '. Array_pop ($arr). ');
ReadFile (file);
?>
Add code that translates the PDF path into a browser-aware language and tells the browser
/upload.php?file=/aa/aa.pdf
So that whatever it is, it will be downloaded, not opened.
http://www.bkjia.com/PHPjc/825213.html www.bkjia.com true http://www.bkjia.com/PHPjc/825213.html techarticle Some browsers install the PDF opener associated to the browser, so the direct way to write the PDF path is to open the PDF instead of the download, below I say if let them just download, not browse ...