I have noticed text like this in the forum.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>
#!/usr/bin/perl
&get_time;
sub get_time {
use Time::localtime;
$tm = localtime;
print "Content-type: text/html\n\n";
print "Local Time: ", $tm->hour,":", $tm->min,":", $tm->sec, "\n";
exit(0);
}
Does this go in the cgi or the html file?Hi Josh,
The code your referring to is placed inside a cgi/perl script. (with a .pl/.cgi extension) uploaded to your server in ascii mode, then chmod'd 755.
Regards,
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>
#!/usr/bin/perl
&get_time;
sub get_time {
use Time::localtime;
$tm = localtime;
print "Content-type: text/html\n\n";
print "Local Time: ", $tm->hour,":", $tm->min,":", $tm->sec, "\n";
exit(0);
}
Does this go in the cgi or the html file?Hi Josh,
The code your referring to is placed inside a cgi/perl script. (with a .pl/.cgi extension) uploaded to your server in ascii mode, then chmod'd 755.
Regards,