[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROG] [PHP] lidt filhåndtering



> Filen er åben. Jeg kan ikke se anden årsag.
>

at filen er åben?
burde det foresage en uendelig løkke?
Er det fordi den ikke kan tage størrelsen på den når den er åben?
Eller er det fordi den først skriver til filen til slut?


> Men den skal jo være $size stor når den er færdig.
> Og så er den filesize($filename) stor til at begynde med.
> Så mangler der:
>   $size = $size - filesize($filename);
> data i den fil.
>
> eller
>   $size -= filesize($filename);
> om du vil.
>
> Hvis du nu prøver:
>  $size = $size - filesize($filename);
>  # Hvor meget mangler?
>  if ($size > 0) {
>   $fp = fopen($filename,"a+");
>   while ($size > 0) {
>    fputs($fp, $data);
>    $size -= strlen($data);
>   }
>   fclose(...
>
> Forstår du hvad der sker?

ikke helt :-/




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:58 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *