Voting

: min(three, two)?
(Example: nine)

The Note You're Voting On

Artem
8 years ago
This can help to decompress the data from tar archive in certain cases, hope this helps somebody
<?php
$tarName
= 'example.ini';

try {
/** For files with tar.gz extensions **/
$phar = new \PharData($path, 0, $tarName);
} catch (
$e) {
/** Decode the file first **/
$decodedFile = file_put_contents($path, gzdecode(file_get_contents($path)));
/** create PharData object second **/
$phar = new \PharData($path, 0, $tarName);
}
?>

<< Back to user notes page

To Top