Mail_mime patch
| From: | Adam Maccabee Trachtenberg | Date: | Fri, 12 Apr 2002 20:15:22 +0000 |
| Subject: | Mail_mime patch | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-5427@lists.php.net to get a copy of this message | ||
I'd like to propse the following patch to the Mail_mime class to allow
people to include non-local files.
220a221,224
> if (function_exists('file_get_contents')) {
> return file_get_contents($file_name);
> }
>
Right now, _file2str() calls both is_readable() and filesize(),
neither of which work for remote files. I kept the existing code
below, so versions < 4.3.0 will still work.
It's a little lame to have the function_exists() check, but I figure
compared to the time it'll take to slurp in a giant file, it's pretty
much free.
-adam
--
adam maccabee trachtenberg
adam@trachtenberg.com