CakeFest 2024: The Official CakePHP Conference

RarArchive::getComment

rar_comment_get

(PECL rar >= 2.0.0)

RarArchive::getComment -- rar_comment_getObtener comentarios de texto desde el archivo RAR

Descripción

Estilo orientado a objetos (method):

public RarArchive::getComment(): string

Estilo por procedimientos:

rar_comment_get(RarArchive $rarfile): string

Obtener (global) comentario almacenado en el archivo RAR. Este puede ser de hasta 64 KiB de longitud.

Nota:

Esta extensión no es compatible con los comentarios en el nivel de entrada.

Parámetros

rarfile

Un objeto RarArchive, abierto con rar_open().

Valores devueltos

Devuelve el comentario o null si no hay ninguno.

Nota:

RAR no tiene actualmente soporte para comentarios unicode. La codificación de los resultados de esta función no es especificado, pero esta debe ser probablemente Windows-1252.

Ejemplos

Ejemplo #1 Estilo orientado a objetos

<?php
$rar_arch
= RarArchive::open('commented.rar');
echo
$rar_arch->getComment();
?>

El resultado del ejemplo sería algo similar a:

This is the comment of the file commented.rar.

Ejemplo #2 Estilo por procedimientos

<?php
$rar_arch
= rar_open('commented.rar');
echo
rar_comment_get($rar_arch);
?>

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top