Home Tutorial Php Phpfiles PHP function is_file() and example

 
 

Share on Google+Share on Google+
PHP function is_file() 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 fwrite() and its example

  • bool_is_file function states whether the given file is regular file or not

Syntax

bool is_file(file_name)


Example of PHP is_file() PHP
Code
<?php

    $a
=is_file("bb.txt");
    if
($a)
      echo
"bb.txt is a file";
    else
       echo
"bb.txt is not a file";
    echo
"<br/>";

    $a
=is_file("c:\rose1");
    if
($a)
      echo
"rose1 is a file";
    else
      echo
"rose1 is not a file";
?>

Outpu
t
bb.txt is a file
rose1 is not a file

Advertisement

Related Tags for PHP function is_file() 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