Hallo Andreas,
ich zitiere einen Kommentar von Rob Funk im PHP-Manual von readfile()
<http://php.cgerharz.de/readfile>:
> When using readfile() with very large files, it's possible to run into
> problems
> due to the memory_limit setting; apparently readfile() pulls the whole
file
> into memory at once.
>
> One solution is to make sure memory_limit is larger than the largest file
> you'll
> use with readfile(). A better solution is to write a chunking readfile.
> Here's a simple one that doesn't exactly conform to the API, but is close
> enough for most purposes:
>
> <?php
> function readfile_chunked ($filename) {
> $chunksize = 1*(1024*1024); // how many bytes per chunk
> $buffer = '';
> $handle = fopen($filename, 'rb');
> if ($handle === false) {
> return false;
> }
> while (!feof($handle)) {
> $buffer = fread($handle, $chunksize);
> print $buffer;
> }
> return fclose($handle);
> }
> ?>
Hoffe, ich konnte dir helfen.
Viele Gruesse,
Chris
--------------------------------------------------------------------------
Apache HTTP Server Mailing List "users-de"
unsubscribe-Anfragen an [EMAIL PROTECTED]
sonstige Anfragen an [EMAIL PROTECTED]
--------------------------------------------------------------------------