Home Tutorial Php Phpfiles PHP filetype() function and example

 
 

PHP filetype() function and example
Posted on: October 29, 2009 at 12:00 AM
Advertisement
This section of PHP tutorial, we illustrates you the how to use of filetype functions and its examples.

Syntax
string filetype(file_name)

  • It gives the file type of the give file name in string form
  • File types are dir, block, link, file, fifo, char, socket and unknown.


Example of PHP filetype() Function

Code
<?php
    $name=filetype("c:/rose1/ram.txt");
    echo
"file type is ".$name;
?>

Output
file type is file

Advertisement

Related Tags for PHP filetype() function and example :


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: October 29, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com