Horje Website
PHP is_file() Function – Check whether the specified filename is a regular file:

PHP is_file() Function – Check whether the specified filename is a regular file:

 
 
  1. <?php
  2. $file = "test.txt";
  3. if(is_file($file)) {
  4. echo ("$file is a regular file");
  5. } else {
  6. echo ("$file is not a regular file");
  7. }
  8. ?>

 

Output

 
 
  1. test.txt is a regular file
Published:
November 15, 2022
Author:
admin
Category:
PHP Source Code
Views:
11

This article was posted in PHP Source Code. Bookmark the permalink. Follow comments with the RSS feed for this post.Post a Comment or leave a trackback: Trackback URL.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Horje © 2011 - 2022