Re: fopen wierdness
| From: | Steve Werby | Date: | Fri, 06 Apr 2001 02:54:47 +0000 |
| Subject: | Re: fopen wierdness | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47379@lists.php.net to get a copy of this message | ||
"Steve Werby" <steve-lists@befriend.com> wrote:
> acutally i found my problem, what was happening was that script1 that was
> on the server that file resides had that file open at the same time that
> scirpt2 was trying to open via http, when i change that files name, the
> permissions changed, and script1 was unable to open the file, and so
> script2 was able to :p my bad.
>
> but it leads me to another question, is there a way to get the file size
> of something opened via httpd?
If you use fread() to save the contents of the file into a variable and then
use strlen() on the variable that will be pretty close. If it's important
add on a few hundred bytes for the headers that don't get read in.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/