Re: external file size, the bad way

From: Date: Wed, 26 Jul 2000 12:19:45 +0000
Subject: Re: external file size, the bad way
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-26278@lists.php.net to get a copy of this message
w>> I╢ve found a solution. A crappy one.... w>> Would be nice if someone had a better one... w>> w>> w>> while (!feof($fp)) { fread($fp,1); $i++; } w>> echo $i-1; Well, I think we need some function to get connection headers for the handle, which might contain file size too. I mean, when we use fopen wrappers it should store response headers in some sturcture, probably. Or we need set of libraries in PEAR that do it via sockets, like Perl's LWP. We might just take libwww from W3C and hook to it. -- Stanislav Malyshev stas@zend.com +972-3-6139665 ext.106

« previous php.dev (#26278) next »