I have a database tracking 25 thousand technical drawings, with the directory paths for these drawings stored in another table.
I've written a script to determine lookup the filepath of the drawing, but I'm running into problems when I try to hyperlink the name of the drawing to the actual PDF of it.
I can't link directly to it as the load of running a query for the filepath of each drawing would make it very, very slow.
At the moment (mostly due to the way the system was coded before me) I'm opening a popup window that selects the drawing and its filepath, and then redirects to the file.
I've tried using the "header('location:file://$path');" and also the "readfile($finalpath);" method in order to try and get the file to the user, but I run into a problem.
PHP is trying to open the file using the webserver's own premissions, which, since the network admin is smarter than me, is locked right down. Now, everyone on the project will have windows access to this file, that won't be an issue; but I need either a way to open the file with the user's credentials OR a better way to deliver the file.