hi so im trying to display a pdf file in the browser using php so i used this code
<?php
$filename = "uploads/docs/Preamble and National Territory.pdf";
header("Content-type: application/pdf");
header("Content-Length: " . filesize($filename));
readfile($filename);
exit;
?>
i juat hardcoded the pdf file name but will change it later my problem is it does not load the pdf file in my browser here is what it says
any idea how to improve my code? or what im doing wrong? thanks in advance