Home Tutorial Php Phpfiles PHPis_dir() Function and example

 
 

PHPis_dir() Function and example
Posted on: October 30, 2009 at 12:00 AM
Advertisement
This segment of the PHP tutorial illustrates the use of file handling function is_dir() and its example

Syntax

bool is_dir(file_name);

  • The PHP is_dir() function states that whether the given path is the directory or the file
  • It returns 1 if the given path is directory


Example of PHP is_dir() Function PHP

Code
<?php

    echo
"is this directory".is_dir("c:/rose1");
    echo
"<br>is this directory".is_dir("c:/rose1/ram.txt");
?>

Output
is this directory1
is this directory

Advertisement

Related Tags for PHPis_dir() 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 30, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com