欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放

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)

欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放