public static function output($path, $length = 102400, $delay = 0)
    {
        if (is_readable($path) === false) {
            return false;
        }

        $buffer = ob_get_level() !== 0;

        $handle = fopen($path, 'rb');

        $length = is_int($length) && $length > 0 ? $length : 102400;

        while (false === feof($handle)) {
            echo fread($handle, $length);

            if ($delay > 0) {
                usleep($delay);
            }

            if ($buffer) {
                ob_flush();
            }

            flush();
        }
    }
public static function output($path, $length = 102400, $delay = 0)
    {
        if (is_readable($path) === false) {
            return false;
        }

        $buffer = ob_get_level() !== 0;

        $handle = fopen($path, 'rb');

        $length = is_int($length) && $length > 0 ? $length : 102400;

        while (false === feof($handle)) {
            echo fread($handle, $length);

            if ($delay > 0) {
                usleep($delay);
            }

            if ($buffer) {
                ob_flush();
            }

            flush();
        }
    }
public static function output ( $ path , $ length = 102400 , $ delay = 0 ) { if ( is_readable ( $ path ) === false ) { return false ; } $ buffer = ob_get_level ( ) !== 0 ; $ handle = fopen ( $ path , 'rb' ) ; $ length = is_int ( $ length ) && $ length > 0 ? $ length : 102400 ; while ( false === feof ( $ handle ) ) { echo fread ( $ handle , $ length ) ; if ( $ delay > 0 ) { usleep ( $ delay ) ; } if ( $ buffer ) { ob_flush ( ) ; } flush ( ) ; } }
Show file in output, if use ob_start is auto used ob_flush. You can set delay for cycles

@param string $path
@param int    $length
@param int    $delay
@return void|bool
Show file in output if use ob_start is auto used ob_flush . You can set delay for cycles