![]() |
The finfo_set_flags() function is an inbuilt function in PHP that is used to set or change the behavior of the Fileinfo extension. It allows you to modify the flags that control the file information returned by the Fileinfo functions. Syntax: finfo_set_flags(finfo $finfo, int $flags): bool
Parameters: This function accepts two parameters that are described below.
Return Values: The finfo_set_flags() function returns “true” if it successfully sets the flags otherwise this function returns “false”. Program 1: The following program demonstrates the finfo_set_flags() function. PHP
Output: File type of ./output.txt is: text/plain; charset=us-ascii
Program 2: The following program demonstrates the finfo_file() function. PHP
Output: File type of example.php is: text/x-php Reference: https://www.php.net/manual/en/function.finfo-set-flags.php |
Reffered: https://www.geeksforgeeks.org
PHP |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |