Current Location: Home> Function Categories> filetype

filetype

Get file type
Name:filetype
Category:File system
Programming Language:php
One-line Description:Returns the file type.

Example

Example 1

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">filetype</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"test.txt"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

Output:

 file

Example 2

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">filetype</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"images"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

Output:

 dir
Similar Functions
Popular Articles