downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

ZipArchive::addFile> <ZipArchive
[edit] Last updated: Fri, 24 Jun 2011

view this page in

ZipArchive::addEmptyDir

(PHP 5 >= 5.2.0, PECL zip >= 1.8.0)

ZipArchive::addEmptyDirاضافه نمودن دایرکتوری

Description

bool ZipArchive::addEmptyDir ( string $dirname )

اضافه نمودن دایرکتوری خالی در آرشیو.

Parameters

dirname

ٔدایرکتوری برای اضافه کردن.

Return Values

Returns TRUE on success or FALSE on failure.

Examples

Example #1 ساخت دایرکتوری جدید در آرشیو

<?php
$zip 
= new ZipArchive;
if (
$zip->open('test.zip') === TRUE) {
    if(
$zip->addEmptyDir('newDirectory')) {
        echo 
'Created a new root directory';
    } else {
        echo 
'Could not create the directory';
    }
    
$zip->close();
} else {
    echo 
'failed';
}
?>


add a note add a note User Contributed Notes ZipArchive::addEmptyDir - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites