男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

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)

男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站