|
-
Aug 9th, 2005, 02:19 PM
#1
Thread Starter
Frenzied Member
Error404? Code doesn't work
Hi guys, another question about CGI/Perl, the code is below:
#!/usr/bin/perl
use CGI qw(:standard);
#use strict;
use Fcntl qw(:flock :seek);
# the Content-type header is required even if nothing else is printed.
print header;
# open file for appending
open(OUT,">>errlog.txt") or exit;
flock(OUT,LOCK_EX);
seek(OUT,0,SEEK_END);
print OUT "uri: $ENV{REQUEST_URI}, referer: $ENV{HTTP_REFERER}\n";
close(OUT);
When I uploaded it my CGI-BiN, it seemed the page is blank. It didn't show anything besides writing it to my counts.txt. But the example on that website has something, here is the link of that
http://www.cgi101.com/book/ch8/
When you click on that err404.html, it shows error page. I believe that's my target; however, my page is simply blank. Any idea or additional code to work on?
I'm so perplexed about this, any helps might be much appreciated.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|