简体   繁体   English

麻烦了解php Finfo内置类

[英]trouble understanding the php Finfo built-in class

I have been following along with some examples in php book when I came across a primitive image gallery example that displays all the images in a particular folder in the browser. 当我遇到一个原始图像库示例时,我一直在跟着php书中的一些示例进行操作,该示例在浏览器的特定文件夹中显示所有图像。 the author uses a class called Finfo like this... 作者使用了一个名为Finfo的类,就像这样...

$fileInfo = new Finfo( FILEINFO_MIME_TYPE );

I'm assuming Finfo is some sort of built in class in php but I can't seem to find any documentation on it. 我假设Finfo是php中的某种内置类,但是我似乎找不到关于它的任何文档。 Can anyone point me in the right direction. 谁能指出我正确的方向。 Thanks. 谢谢。

You can find the documentation of finfo_file manual here. 您可以在这里找到finfo_file手册的文档。 The functions in the Fileinfo PHP extension used to determine content type and encoding of a file by looking for certain magic byte sequences at specific positions within the file. Fileinfo PHP扩展中的函数用于通过在文件中特定位置查找某些魔术字节序列来确定文件的内容类型和编码。

http://php.net/manual/en/function.finfo-file.php http://php.net/manual/zh/function.finfo-file.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM