Re: Reg - Video File Chunk issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fread does not return the exactly size of bytes. You should process it manually

while (!feof($fp)) {
      $chunk += fread($fp, 4 * 1024 * 1024); // chunk the file as 4MB
while( $chunk.length >= 4M) {
$chunk4m = $chunk.substring(0, 4M);
fwrite(file, chunk4m)
$chunk = $chunk.substring(4M)
}
}



On Jul 18, 2024, at 4:34 PM, Raghul Tlv <tlvraghul@xxxxxxxxx> wrote:

while (!feof($fp)) {
      $chunk = fread($fp, 4 * 1024 * 1024); // chunk the file as 4MB
}


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux