Phar::convertToZip

(No version information available, might be only in CVS)

Phar::convertToZip — Convert the phar archive to the zip file format

Описание

bool Phar::convertToZip ( void )

Замечание: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown.

This method is used to convert a phar archive in phar or tar format to the zip file format.

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

No parameters are accepted.

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

Errors/Exceptions

This method throws BadMethodCallException when the requested archive is buffering with Phar::startBuffering() and has not concluded with Phar::stopBuffering(), an UnexpectedValueException if write support is disabled, and a PharException if any problems are encountered during the phar creation process.

Примеры

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

Using Phar::convertToZip():

<?php
try {
    
$phar = new Phar('myphar.phar');
    
// convert it to the zip file format
    
$phar->convertToZip();
    
$phar->setStub('<?php Phar::webPhar("myphar.phar", "web/index.php");
include "phar://" . __FILE__ . "/cli.php";
__HALT_COMPILER();'
);
} catch (
Exception $e) {
    
// handle the error here
}
?>

[an error occurred while processing the directive]

Коментарии

404 Not Found

404 Not Found


nginx

    Поддержать сайт на родительском проекте КГБ