On Thu, 20 Sep 2001, Philip Mak wrote:
> I have a page on my website that prints a plain text file in HTML. So, it
> does something like this:
>
> print "<PRE>";
> open(FANFIC, "$file") or print "File not found: $!\n";
> print Apache::Util::escape_html($_) while (<FANFIC>);
> close(FANFIC);
> print "</PRE>\n";
>
> I used to use $Server->HTMLEncode() instead of
> Apache::Util::escape_html(), but I noticed that
> Apache::Util::escape_html() could do it in 40 requests per second, as
> compared to 30. AFAIK these two functions are semantically equivalent, so
> perhaps $Server->HTMLEncode should use the same code as
> Apache::Util::escape_html, which is compiled C code I believe?
Why not use the fastest code of all?
print "<PRE><XMP>";
open(FANFIC, "$file") or print "File not found:$!\n";
print $_ while (<FANFIC>);
close(FANFIC);
print
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]