PHP.nl

finfo_buffer

finfo_buffer

finfo::buffer

Return information about a string buffer

style.procedural

 **finfo_buffer** finfo $finfo string $string int $flags  $context

style.oop

 **finfo::buffer** string $string int $flags  $context

This function is used to get information about binary data in a string.

finfo``stringContent of a file to be checked.

flags One or disjunction of more . Fileinfo constants

context

Returns a textual description of the argument, or false if an error occurred. string

Voorbeeld: A example

<?php
$finfo = new finfo(FILEINFO_MIME);
echo $finfo->buffer($_POST["script"]) . "\n";
?>
application/x-sh; charset=us-ascii

finfo_file