Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- try {
- $output = trim(readline('output file.phar : '));
- $phar = new Phar($output);
- $input = readline('count of files to compress : ');
- $file = array();
- for ($x = 0; $x < $input; $x++) {
- $file[$x] = trim(readline('filename : '));
- $phar[basename($file[$x])] = file_get_contents($file[$x]);
- }
- $phar->compressFiles(Phar::GZ);
- $phar->setSignatureAlgorithm(Phar::SHA1);
- $phar->setStub('<?php Phar::webPhar();__HALT_COMPILER(); ?>');
- } catch (Exception $e) {
- echo $e->getMessage();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement