WC_Download_Handler::readfile_chunked │ public static │ WC 1.0

Read file chunked.

Reads file in chunks so big downloads are possible without changing PHP.INI - http://codeigniter.com/wiki/Download_helper_for_large_files/.

Method of the class: WC_Download_Handler{}

No Hooks.

Returns

bool. Success or fail

Usage

$result = WC_Download_Handler::readfile_chunked( $file, $start, $length );
$file(string) (required)
File.
$start(int)
Byte offset/position of the beginning from which to read from the file.
$length(int)
Length of the chunk to be read from the file in bytes, 0 means full file.

WC_Download_Handler::readfile_chunked() code WC 11.2.2

public static function readfile_chunked( $file, $start = 0, $length = 0 ) {
	return self::READ_RESULT_SUCCESS === self::readfile_chunked_with_result( $file, $start, $length );
}