skip to Main Content

Php – Changing the URL title while serving a PDF file

I have a simple PHP file download script, <?php $file = sprintf("/home/data/files/%d", intval($_GET['id'])); if (! file_exists($file)) { die("no such file"); } if (str_ends_with($_GET['name'], ".pdf")) { header("Content-Type: application/pdf"); } else { header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename="" . $_GET['name'] . """); }…

VIEW QUESTION

How to install poppler on Debian

I already have installed a previous version (version 22) of poppler but when updating to the newest version (version 23) I get a lot of dependency errors? Which packages are missing? Distro: Debian Bullseye 11 # apt-get install libopenjp2-7-dev libfreetype6-dev…

VIEW QUESTION

How to save PDF file into MYSQL database? (PHP)

I'm trying to save all the information inserted by user into database, all the info are able to save except the pdf file. My code: usermanual.php <div id="usermanualModal" class="modal fade"> <div class="modal-dialog"> <form method="post" enctype="multipart/form-data" id="usermanualForm"> <div class="modal-content"> <div class="modal-header">…

VIEW QUESTION
Back To Top
Search