Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: RarArchive::isSolid - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: RarArchive::isSolid

2025-04-28

RarArchive::isSolid

rar_solid_is

(PECL rar >= 2.0.0)

RarArchive::isSolid -- rar_solid_isCheck whether the RAR archive is solid

说明

面向对象风格 (method):

public RarArchive::isSolid(): bool

过程化风格:

rar_solid_is(RarArchive $rarfile): bool

Check whether the RAR archive is solid. Individual file extraction is slower on solid archives.

参数

rarfile

A RarArchive object, opened with rar_open().

返回值

Returns true if the archive is solid, false otherwise.

示例

示例 #1 面向对象风格

<?php
$arch1
= RarArchive::open("store_method.rar");
$arch2 = RarArchive::open("solid.rar");
echo
"$arch1: " . ($arch1->isSolid()?'yes':'no') ."\n";
echo
"$arch2: " . ($arch2->isSolid()?'yes':'no') . "\n";
?>

以上示例的输出类似于:

RAR Archive "C:\php_rar\trunk\tests\store_method.rar": no
RAR Archive "C:\php_rar\trunk\tests\solid.rar": yes

示例 #2 过程化风格

<?php
$arch1
= rar_open("store_method.rar");
$arch2 = rar_open("solid.rar");
echo
"$arch1: " . (rar_solid_is($arch1)?'yes':'no') ."\n";
echo
"$arch2: " . (rar_solid_is($arch2)?'yes':'no') . "\n";
?>
添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/rararchive.issolid.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3