in reply to CGI Help
Dying prints to STDERR, CGI expects STDOUT. Your death will be printed into the web server's error log instead. Perhaps you mean:
unless (open(FH, "<", "indexfile")) { print "Content-Type: text/html\n\n<h1>NOOOOOOO!!!!!</h1>Error: $!\n" +; exit(1); }
BTW, I highly recommend using the text/plain content-type as long as you are debugging. It makes errors a lot more evident because web browsers try to "fix" a lot of bad HTML. (And you don't have to think of escaping HTML at that moment. Escaping is something you lack currently. It will lead to cross-site scripting vulnerabilities.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI Help
by linuxkid (Sexton) on Mar 22, 2012 at 15:01 UTC |