91亚洲精品福利在线播放,欧美日韩国产在线人成app,天天躁日日躁疯人影院,sao虎视频最新网站入口,精品久久久久久中文字幕女

Phar::setDefaultStub

(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL phar >= 2.0.0)

Phar::setDefaultStubUsed to set the PHP loader or bootstrap stub of a Phar archive to the default loader

說(shuō)明

public Phar::setDefaultStub(?string $index = null, ?string $webIndex = null): bool

注意:

此方法需要 將 php.ini 中的 phar.readonly 設為 0 以適合 Phar 對象. 否則, 將拋出PharException.

This method is a convenience method that combines the functionality of Phar::createDefaultStub() and Phar::setStub().

參數

index

Relative path within the phar archive to run if accessed on the command-line

webIndex

Relative path within the phar archive to run if accessed through a web browser

返回值

成功時(shí)返回 true, 或者在失敗時(shí)返回 false。

錯誤/異常

UnexpectedValueException is thrown if phar.readonly is enabled in php.ini. PharException is thrown if any problems are encountered flushing changes to disk.

更新日志

版本 說(shuō)明
8.0.0 webIndex is nullable now.

范例

示例 #1 A Phar::setDefaultStub() example

<?php
try {
    
$phar = new Phar('myphar.phar');
    
$phar->setDefaultStub('cli.php''web/index.php');
    
// this is the same as:
    // $phar->setStub($phar->createDefaultStub('cli.php', 'web/index.php'));
} catch (Exception $e) {
    
// handle errors
}
?>

參見(jiàn)

91亚洲精品福利在线播放,欧美日韩国产在线人成app,天天躁日日躁疯人影院,sao虎视频最新网站入口,精品久久久久久中文字幕女