Search Results
Return information about a file Parameters ¶ finfo An finfo instance, returned by finfo_open (). filename Name of a file to be checked. flags One or disjunction of more Fileinfo constants. context For a description of contexts, refer to Stream Functions.
Apr 28, 2025 · Output: application/x-empty; charset=binary Example 2: In the below example, we will print the file information using finfo_file () functions.
Return Values Returns a textual description of the contents of the file_name argument, or FALSE if an error occurred.
Description string finfo_file ( resource finfo, string file_name [, int options [, resource context]] ) class finfo { string file ( string file_name [, int options [, resource context]] ) } This function is used to get information about a file.
finfo Fileinfo resource returned by finfo_open (). file_name Name of a file to be checked. options One or disjunction of more Fileinfo constants. context For a description of contexts, refer to Streams.
The finfo_file function determines the MIME type of file contents. Its first parameter accepts a resource returned by the finfo_open function, and the second - the path to the file.
People also ask
What is finfo_file() function in PHP?
What are the parameters of finfo_open() function?
What does finfo_open() do?
Which parameter expects an finfo instance now?
finfo_file · Fileinfo · PHP · osbo.com Attributes abbr accept accept-charset accesskey action alt as async autocapitalize autocomplete autofocus autoplay blocking charset checked cite class color cols colspan contenteditable controls coords crossorigin data datetime decoding default defer dir dirname disabled download draggable enctype enterkeyhint exportparts fetchpriority for form ...
