RarArchive::close

rar_close

(PECL rar >= 2.0.0)

RarArchive::close -- rar_closeClose RAR archive and free all resources

说锟斤拷

锟斤拷锟斤拷锟斤拷锟斤拷锟� (method):

public RarArchive::close ( void ) : bool

锟斤拷锟教伙拷锟斤拷锟�:

rar_close ( RarArchive $rarfile ) : bool

Close RAR archive and free all allocated resources.

锟斤拷锟斤拷

rarfile

A RarArchive object, opened with rar_open().

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE锟斤拷

锟斤拷锟斤拷锟斤拷志

锟芥本 说锟斤拷
2.0.0 The RAR entries returned by RarArchive::getEntry() and RarArchive::getEntries() are now invalidated when calling this method. This means that all instance methods called for such entries and not guaranteed to succeed.

锟斤拷锟斤拷

Example #1 锟斤拷锟斤拷锟斤拷锟斤拷锟�

<?php
$rar_arch 
RarArchive::open('latest_winrar.rar');
echo 
$rar_arch."\n";
$rar_arch->close();
echo 
$rar_arch."\n";
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

RAR Archive "D:\php_rar\trunk\tests\latest_winrar.rar"
RAR Archive "D:\php_rar\trunk\tests\latest_winrar.rar" (closed)

Example #2 锟斤拷锟教伙拷锟斤拷锟�

<?php
$rar_arch 
rar_open('latest_winrar.rar');
echo 
$rar_arch."\n";
rar_close($rar_arch);
echo 
$rar_arch."\n";
?>