Re: [SMARTY-DEV] [PATCH] use file_get_contents instead fread($fp, filesize($filename))

From: Date: Tue, 06 Jul 2004 20:16:03 +0000
Subject: Re: [SMARTY-DEV] [PATCH] use file_get_contents instead fread($fp, filesize($filename))
References: 1 2 3  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2445@lists.php.net to get a copy of this message
On Tue, Jul 06, 2004 at 11:26:45PM +0400, Antony Dovgal wrote: > 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). the bug is just 2 days old. i'd wait till it gets a "bogus" or "wontfix" status before i take any measures for smarty. and i'd be really shock if this bug doesn't get fixed and this incompatibility goes into php5.

« previous php.smarty.dev (#2445) next »