Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How filetype defines and uses

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article is about how filetype is defined and used. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Filetype is computer programming. The filetype search instruction is very useful for searching documents in a certain format, which can help us to improve the efficiency of searching to a great extent.

Definition and usage of filetype

1. The filetype () function of PHP returns the type of the specified file or directory.

If successful, 7 possible values are returned. If it fails, false is returned.

Possible value: fifochardirblocklinkfileunknown

2, the search engine filetype usage is filetype: file type keywords, the values returned are keyword files of the specified file type.

The filetype file types supported by google are:

Pptxlsdocrtfswfpdfkmzkmlpsdef

Commonly used are the first few, respectively, ppt documents, excel data documents, word documents, WordPad documents, flash,pdf documents, googleearth coordinate documents, the latter two are rarely used.

In Baidu, the file types supported by filetype are:

Pptxlsdocrtfpdftxt

It should be noted that when we use the filetype command, the subsequent file type must be the above file type (Baidu and google are not the same), in addition to entering the file type, we also need to enter keywords, such as the above mentioned filetype:ppt new era plastic hospital, if we only use filetype:ppt then we can not search the content you want, because the search engine does not know what you want.

Syntax of filetype

Filetype (filename)

Parameters.

Description

Filename

Necessary. Documents that are required to be inspected.

Tips and comments editin

Tip: the results of this function will be cached. Use clearstatcache () to clear the cache.

Example 1

Output:

File

Example 2

Output:

Dir

PHPFilesystem function

Thank you for reading! This is the end of the article on "how to define and use filetype". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report