codecamp

PHP8 RarEntry::getMethod

(PECL rar >= 0.1)

RarEntry::getMethod — 获取条目的 pack 方法

说明

public RarEntry::getMethod(): int

RarEntry::getMethod() 返回添加时使用的方法的编号 当前存档条目。

参数

此函数没有参数。

返回值

出错时返回方法编号或 false。

示例

示例 #1 RarEntry::getMethod() example

<?php

$rar_file = rar_open('example.rar') or die("Failed to open Rar archive");

$entry = rar_entry_get($rar_file, 'Dir/file.txt') or die("Failed to find such entry");

echo "Method number: " . $entry->getMethod();

?>


PHP8 RarEntry::getHostOs
PHP8 RarEntry::getName
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定