src/Transfer.php
public function stream()
    {
        if (ob_get_level()) {
            ob_end_clean();
        }

        // Transfer file in 1024 byte chunks to save memory usage.
        if ($fd = fopen($this->path, 'rb')) {
            while (!feof($fd)) {
                echo fread($fd, 1024);
            }
            fclose($fd);
        }
    }
public function stream()
    {
        if (ob_get_level()) {
            ob_end_clean();
        }

        // Transfer file in 1024 byte chunks to save memory usage.
        if ($fd = fopen($this->path, 'rb')) {
            while (!feof($fd)) {
                echo fread($fd, 1024);
            }
            fclose($fd);
        }
    }
public function stream ( ) { if ( ob_get_level ( ) ) { ob_end_clean ( ) ; } // Transfer file in 1024 byte chunks to save memory usage. if ( $ fd = fopen ( $ this -> path , 'rb' ) ) { while ( ! feof ( $ fd ) ) { echo fread ( $ fd , 1024 ) ; } fclose ( $ fd ) ; } }
Transfer an image to the browser
Transfer an image to the browser