php man page for finfo_file

Query: finfo_file

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

FINFO_FILE(3)								 1							     FINFO_FILE(3)

finfo_file - Return information about a file

       Procedural style

SYNOPSIS
string finfo_file NULL NULL (resource $finfo, string $file_name, [int $options = FILEINFO_NONE], [resource $context])
DESCRIPTION
Object oriented style string finfo::file NULL NULL (string $file_name, [int $options = FILEINFO_NONE], [resource $context]) This function is used to get information about a file.
PARAMETERS
o $finfo - Fileinfo resource returned by finfo_open(3). o $file_name - Name of a file to be checked. o $options - One or disjunction of more Fileinfo constants. o $context - For a description of contexts, refer to "Stream Functions".
RETURN VALUES
Returns a textual description of the contents of the $file_name argument, or FALSE if an error occurred.
EXAMPLES
Example #1 A finfo_file(3) example <?php $finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension foreach (glob("*") as $filename) { echo finfo_file($finfo, $filename) . " "; } finfo_close($finfo); ?> The above example will output something similar to: text/html image/gif application/vnd.ms-excel
SEE ALSO
finfo_buffer(3). PHP Documentation Group FINFO_FILE(3)
Related Man Pages
apr::finfo(3) - mojave
finfo_open(3) - php
maxdb_fetch_field(3) - php
maxdb_field_tell(3) - php
mysqli_field_seek(3) - php
Similar Topics in the Unix Linux Community
Filename Validation
how to copy data to to excel file
Help with excel generate
shell scripting to export the results to an excel file
Writing excel file using perl : Excel file formatting changed