Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 22636 программистов и 1129 роботов. Сейчас ищет 671 программист ...
Приступая к работе

Phar::addEmptyDir - Add an empty directory to the phar archive

Вернуться к: Phar

Phar::addEmptyDir

(Unknown)

Phar::addEmptyDirAdd an empty directory to the phar archive

Описание

public void Phar::addEmptyDir ( string $dirname )

Замечание:

Для корректной работы с объектами Phar этому методу необходима установка значения php.ini phar.readonly в 0. В противном случае, будет выброшено исключение PharException.

With this method, an empty directory is created with path dirname. This method is similar to ZipArchive::addEmptyDir().

Список параметров

dirname

The name of the empty directory to create in the phar archive

Возвращаемые значения

no return value, exception is thrown on failure.

Примеры

Пример #1 A Phar::addEmptyDir() example

<?php
try {
    
$a = new Phar('/path/to/phar.phar');

    
$a->addEmptyDir('/full/path/to/file');
    
// demonstrates how this file is stored
    
$b $a['full/path/to/file']->isDir();
} catch (
Exception $e) {
    
// handle errors here
}
?>

Смотрите также



Вернуться к: Phar

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware