From: "frederik feys" <[EMAIL PROTECTED]>

> I thought str_replace caused slow down of my mailing script, but it
> seems to be this line of code:
>
> $fd =
> implode("",file("http://www.domain.org/store/min/Mailing_template.html";)
> );
>
> I first put the mailing template in $fd (only once) and then replace
> (str_replace) elements of it to individualize HTML emails.
> Btw i'm using php version 4.0.6.
>
> Are there better(faster) ways to read the contents of a file?

file_get_contents() ?

The slow down is probably because you're going through HTTP to read the
file. Is there a reason for that? Any way you can cache the file locally so
it's not read through HTTP all of the time?

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to