--- Altug Sahin <[EMAIL PROTECTED]> wrote: > <? > $file = $_POST[fileID]; > $files_folder = "C:\\temp\\"; > $dlfile = $files_folder.$file; > > header("Content-type: application/pdf"); > readfile("$dlfile"); > ?> > > I get this... > "Warning: readfile("C:\temp\test.pdf") - No such file or > directory in c:\inetpub\wwwroot\dlQ_safe.php on line 10" > > The test.pdf file is of course there...
My guess is that the test.pdf file is of course not there. You can try to use file_exists() if you do not trust the warning message, but I see no reason not to trust it. > What do I need to add to this script so that whatever a > pdf filename is submitted, acrobat will open this file > in the user's browser? This is a different question, but search for examples on using the Content-Disposition header. I believe there is a directive called "inline" that you can give it to try to force a browser to display the content inline rather than prompt for a download. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php