Re: [SMARTY-DEV] [PATCH] use file_get_contents instead fread($fp, filesize($filename))
| From: | Antony Dovgal | Date: | Tue, 06 Jul 2004 19:26:45 +0000 |
| Subject: | Re: [SMARTY-DEV] [PATCH] use file_get_contents instead fread($fp, filesize($filename)) | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2444@lists.php.net to get a copy of this message | ||
On Tue, 6 Jul 2004 10:00:21 -0700 (PDT)
boots <jayboots@yahoo.com> wrote:
> --- Antony Dovgal <tony2001@phpclub.net> wrote:
> > Regardless of the fact that this bug will be fixed (I hope), this
> > fopen-fread-filesize-fclose mess can be safely replaced by one
> > file_get_contents() calls.
> >
> > Please, review it.
>
> I think this has been discussed (?). A problem with file_get_contents
> is that it would increase the requirements of Smarty to PHP >= 4.3
aha, I got it.
so maybe it worth to make some other workaround for it?
something like:
$contents = '';
while ($buf = fread($fp, 4096)) $contents .= $buf;
?
I'm not sure if this bug will be fixed and just want to make a
workaround before the real problem appears ('cos it already appeared
for me).
--
Wbr,
Antony Dovgal aka tony2001
tony2001@phpclub.net || antony@dovgal.com