W
W
webpixel2014-12-15 16:02:55
PHP
webpixel, 2014-12-15 16:02:55

How to split an archive into even parts using PHP?

Hello connoisseurs! I would like to archive files broken down into even parts, I wrote the following piece of heresy:

$file = 'sasha_grey.avi';
$name = 'flower';
$amount = 3;

$part = ( filesize($file) / $amount ) / 1024 + 1;

$pack = exec('rar.exe a -ep1 -m0 -v' . $part . 'k ' . $name . '.rar ' . $file);

works with files up to 1 GB, then no. Please tell me where am I making a mistake?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Gontarenko, 2014-12-15
@dez-fafara

sasha_grey.avi :D +1
try this
php.net/manual/en/rararchive.open.php#example-795

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question