[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Re: Server Side Include Problem - RaQ3



On Mon, 27 Aug 2001, House of Jupiter wrote:

> OK, I got the "set var" thing to work too.  Which of these two methods would
> be least CPU heavy, or doesn't it make a difference?
> 
> Method 1 :
> 
> <!--#if expr="${DATE_LOCAL} = /01-Aug/" -->
> <!--#include virtual="01aq.txt" -->

dude, you gotta learn some perl ;)

here, maybe this will help:

#!/usr/bin/perl

@t=gmtime(time());
$day = @t[6];
$mon = @t[4];
$yy  = @t[5]+1900;
$dn  = @t[3];

print " $day $mon $dn $yy ";
$cmd="/bin/cat $day-$mon.txt";
system "$cmd";
exit 0;
 
  ----------------

include it as a cgi in the directory where your .txt files are, adape the
day/month format as necessary...

gsh