RarArchive::close

rar_close

(PECL rar >= 2.0.0)

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

설명

객체 기반 형식 (method):

public bool RarArchive::close ( void )

절차식 형식:

bool rar_close ( RarArchive $rarfile )

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";
?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top