Gossamer Forum
Home : Products : DBMan : Customization :

count.cgi

Quote Reply
count.cgi
Objective: post the number of records in database on index.html
I created a count.cgi file, posted in database directory.
to be call by SSI
code used: in count.cgi file
#!/usr/bin/perl
print "Content-type: text/html\n\n";
open (DB, $db_file_name) or &cgierr("Can't open: $!");
my @lines = <DB>;
close DB;
my $count = $#lines + 1;

when called by SSI ...no errors ..no count...nothing!
can someone assist me on this..thanks Rob
Quote Reply
Re: count.cgi In reply to
Rob
I think you have to printout the count. Try

print "$count";

at the end of your code.
Hope this helps.
Rene