mysql - Split tar.gz files using php -


i importing data feed mywebsite.my datafeed files came tar.gz format. file size is large upto 10 gb. need split tar.gz file , upload database. how can split tar.gz single file multiple file. please guide me.

you can create several parts this:

$filename = 'something_big.tar.gz'; $filesize = filesize($filename); $parts = 10; $partsize = ceil($filesize / 10);  $f_in = fopen($filename, 'rb'); ($i = 0; $i < $parts; ++$i) {     $f_out = fopen("$filename.$i", 'wb');     stream_copy_to_stream($f_in, $f_out, $partsize);     fclose($f_out); } fclose($f_in); 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -