Been all over the forum and Lois' FAQ, trying to find out how to show the # of records in my database in sub html_home.
I've tried the
and
ways, coupled with the
#------------------------------------------------
open(FILE, "/path/to/recount.cgi") or die("Couldn't open the file.");
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
print $line;
}
}in both my db.cgi and html.pl, with ref to &include_file; (even print &include;) where I want it printed.
My recount.cgi executes correctly from the browser, so that's fine. My current setup is the sub include_file ref'd above with
&include_file;
print qq|in my sub html_home, but that gives me
open (DB, "/www43/web/izmirh/cgi-local/Databasetest/default.db") or print "Cant' find db!";
while ( ) { $count++; } close DB;
print $count; 1;as the output, :-0.
Nothing seems to work -- I'm out of ideas. Any suggestions?
JR
Webmaster
http://www.izmirhigh.com/index.shtml
I've tried the
Code:
!--#exec cmd="/path/to/recount.cgi" --Code:
!--#exec cgi="/path/to/recount.cgi" --Code:
!--#include virtual="/path/to/recount.cgi" --Code:
sub include_file { #------------------------------------------------
open(FILE, "/path/to/recount.cgi") or die("Couldn't open the file.");
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
print $line;
}
}
My recount.cgi executes correctly from the browser, so that's fine. My current setup is the sub include_file ref'd above with
Code:
|; &include_file;
print qq|
Code:
#!/usr/local/bin/perl #print "Content-type: text/html\n\n"; open (DB, "/www43/web/izmirh/cgi-local/Databasetest/default.db") or print "Cant' find db!";
while ( ) { $count++; } close DB;
print $count; 1;
Nothing seems to work -- I'm out of ideas. Any suggestions?
JR
Webmaster
http://www.izmirhigh.com/index.shtml