mirror of
https://github.com/php-win-ext/php-rar.git
synced 2026-03-24 13:02:06 +01:00
Introduction of RarException. Added rar_solid_get RarEntry and RarArchive cannot be instantiated in user space. Quite some refactoring. git-svn-id: http://svn.php.net/repository/pecl/rar/trunk@292412 c90b9560-bf6c-de11-be94-00142212c4b1
27 lines
496 B
PHP
27 lines
496 B
PHP
--TEST--
|
|
RarEntry::getStream() on unicode entry
|
|
--SKIPIF--
|
|
<?php if(!extension_loaded("rar")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$rar_file1 = rar_open(dirname(__FILE__).'/rar_unicode.rar');
|
|
$entry = rar_entry_get($rar_file1, "file1À۞.txt");
|
|
echo $entry."\n";
|
|
echo "\n";
|
|
$stream = $entry->getStream();
|
|
if ($stream !== false)
|
|
while (!feof($stream)) {
|
|
echo fread($stream, 8192);
|
|
}
|
|
|
|
echo "\n";
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
RarEntry for file "file1À۞.txt" (52b28202)
|
|
|
|
contents of file 1
|
|
Done
|