OK, I'm gonna go out on a limb here (expecting to be thrashed at any moment... :)
As far as I can see, your forms/links do not pass any values to the server in the buffer or query string. All they do is serve one PDF file.
If so, all you need in your script is:
print "Content-type: application/pdf\n\n"; open(PAGE, "</home/username/pdf/ho99-6a.pdf") || die("Can't open file +- $!"); print while (<PAGE>); close(PAGE); exit(0);
You would only need to read the query string / buffer if you actually sent any information.
The only time I would think you might do this is if the document is stored outside the web root and you can't symlink to it.
What would involve query_string / buffer would be if you sent a variable to the script. ie, the html was something like:
<html> <body> <a href="/~newbie/cgi-bin/getpdf2.pl?document=ho99-6a.pdf">Click Here +for Test 1</a><p> <FORM METHOD="POST" ACTION="/~newbie/cgi-bin/getpdf2.pl"> <INPUT TYPE="hidden" NAME="document" VALUE="ho99-6a.pdf"> <INPUT TYPE="SUBMIT" VALUE=" Click here for test 2 "> </FORM> <p> <FORM METHOD="GET" ACTION="/~newbie/cgi-bin/getpdf2.pl"> <INPUT TYPE="hidden" NAME="document" VALUE="ho99-6a.pdf"> <INPUT TYPE="SUBMIT" VALUE=" Click here for test 3 "> </FORM> </body> </html>
Please kick me. I must be missing something here?!?
cLive ;-)
In reply to Re: Odd difference between
by cLive ;-)
in thread Odd difference between
by Xxaxx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |