• PHP Video Tutorials

PHP - FileInfo buffer() Function



The finfo_buffer() function can return information about a string buffer.

Syntax

string finfo_buffer ( resource $finfo , string $string [, int $options [, resource $context ]] )
finfo string buffer ( string $string [, int $options [, resource $context ]] )

The finfo_buffer() function can be used to get information about binary data in a string. It can return a textual description of a string argument, or false if an error occurred.

Example

<?php
   $finfo = new finfo(FILEINFO_MIME);
   echo $finfo->buffer($_POST["script"]) . "\n";
?>
php_function_reference.htm
Advertisements