FINFO_BUFFER(3) 1 FINFO_BUFFER(3)
finfo_buffer - Return information about a string buffer
Procedural style
SYNOPSIS
string finfo_buffer NULL NULL (resource $finfo, string $string, [int $options = FILEINFO_NONE], [resource $context])
DESCRIPTION
Object oriented style string finfo::buffer NULL NULL (string $string, [int $options = FILEINFO_NONE], [resource $context])
This function is used to get information about binary data in a string.
PARAMETERS
o $finfo
- Fileinfo resource returned by finfo_open(3).
o $string
- Content of a file to be checked.
o $options
- One or disjunction of more Fileinfo constants.
o $context
-
RETURN VALUES
Returns a textual description of the $string argument, or FALSE if an error occurred.
EXAMPLES
Example #1
A finfo_buffer(3) example
<?php
$finfo = new finfo(FILEINFO_MIME);
echo $finfo->buffer($_POST["script"]) . "
";
?>
The above example will output something similar to:
application/x-sh; charset=us-ascii
SEE ALSO
finfo_file(3).
PHP Documentation Group FINFO_BUFFER(3)