in reply to CGI SESSION Cookies and SSI help
#!/usr/bin/perl use strict; use warnings; use CGI qw/:standard/; use DBI; use Template; use CGI::Ajax; use CGI::Session; use CGI::Cookie; use CGI::Session::Driver::mysql; use CGI::Carp qw(fatalsToBrowser); my ( $src, $lib, $files ); my $cgi = new CGI; my $ip = $cgi->remote_host; my $c = new CGI::Cookie(-name => 'foo', -value => ['bar','baz'], -expires => '+3m'); print "Set-Cookie: $c\n"; print "Content-Type: text/html\n\n"; my $os = "$^0"; if ( $os =~ /MSWin32/ ) { $src = 'D:/mixedapache/cgies/templatetoolkit/src'; $lib = 'D:/mixedapache/cgies/templatetoolkit/lib'; $files = 'D:/mixedapache/cgies/templatetoolkit/'; } else { $src = '/mnt/win_d/mixedapache/cgies/templatetoolkit/src'; $lib = '/mnt/win_d/mixedapache/cgies/templatetoolkit/lib'; $files = '/mnt/win_d/mixedapache/cgies/templatetoolkit/'; }
|
|---|