
Phar::decompress 함수는 압축된 Phar 아카이브를 디코딩하는 데 사용됩니다.
이 함수의 사용법은 다음과 같습니다.
#hostingforum.kr
php
Phar::decompress($phar, $path, $decompressedPath);
- `$phar`: 압축된 Phar 아카이브의 경로를 지정합니다.
- `$path`: 압축된 Phar 아카이브 내의 파일 또는 디렉토리의 경로를 지정합니다.
- `$decompressedPath`: 디코딩된 파일 또는 디렉토리의 경로를 지정합니다.
예제:
#hostingforum.kr
php
$phar = new Phar('example.phar');
$phar->decompress('file.txt', 'decompressed/file.txt');
이 예제에서는 `example.phar` 압축된 Phar 아카이브 내의 `file.txt` 파일을 디코딩하여 `decompressed/file.txt` 경로에 저장합니다.
2025-07-30 01:05