2016-04-28 17 views
0

内の特定のディレクトリにファイルを.rarを抽出しますこのチュートリアルでは、ファイルをディレクトリに抽出するのではなく、 ファイルの内容をブラウザに出力します。は私が<strong>の.rarファイル</strong>ない私はPHPマニュアル</p> <p><a href="http://php.net/manual/en/rararchive.open.php" rel="nofollow">php manual</a></p> <p>問題での中で、この例に従っPHP を使用して</strong><strong>.zipファイルを抽出したいPHP

+0

(http://php.net/manual/en/rar.installation.php)あなたは、[インストール]していることを確認したプラグイン。その後、[この記事で](http://stackoverflow.com/questions/14555730/how-to-extract-rar-archive-files-and-folders-using-php-in-windows)を参照してください:) – Jer

+0

はい私did、php_rar.dll –

答えて

1

RarEntry::extractメソッドを使用してアーカイブからファイルを抽出できるはずです。

だから、のようなもの:

$archive = RarArchive::open('archive.rar'); 
$entries = $archive->getEntries(); 
foreach ($entries as $entry) { 
    $entry->extract('/extract/to/this/path'); 
} 
$archive->close(); 
+0

ありがとうございます:) :) –

関連する問題