Hi,
I'm new to php and I'm trying to translate the following code :
sub loadPreferences Auto {
local our $content;
open (FILE, "<$dir/preferences_aut o.html") or die "cannot open file
$dir/preferences_aut o.html";
while (<FILE>) {
s/\$LABEL{'([\w]+)'}/ exists $SERVER{$1} ? $SERVER{$1} : $1 /eg;
s/\$LANG/$lang/g;
s/\$ERROR{'([\w]+)'}//g;
s/\$SESSIONID/$session_id/g;
$content .= $_;
}
$content = Compress::Zlib: :memGzip($conte nt) if $can_do_gzip; ;
print "Content-Length: ", length($content ) , "\n";
print "Content-Encoding: gzip\n" ;
print "Content-Type: text/html\n\n";
print $content;
close (FILE);
}
I'm new to php and I'm trying to translate the following code :
sub loadPreferences Auto {
local our $content;
open (FILE, "<$dir/preferences_aut o.html") or die "cannot open file
$dir/preferences_aut o.html";
while (<FILE>) {
s/\$LABEL{'([\w]+)'}/ exists $SERVER{$1} ? $SERVER{$1} : $1 /eg;
s/\$LANG/$lang/g;
s/\$ERROR{'([\w]+)'}//g;
s/\$SESSIONID/$session_id/g;
$content .= $_;
}
$content = Compress::Zlib: :memGzip($conte nt) if $can_do_gzip; ;
print "Content-Length: ", length($content ) , "\n";
print "Content-Encoding: gzip\n" ;
print "Content-Type: text/html\n\n";
print $content;
close (FILE);
}
Comment