How to use Filesystem is file in PHP
In this article I am going to explain about is_file function in PHP.
PHP is_file() Function
The filesystem is_file function checks whether the specified file is a regular file.
Syntax of is_file function
Parameters in is_file function
It has only parameter:
Parameter |
Description |
file |
It specifies the file to check. |
Example of filesystem is_file function
<html>
<body>
<?php
$file = "C:\wamp\www\Dinesh\Mcn.txt";
if(is_file($file))
{
echo ("$file is a regular file");
}
else
{
echo ("$file is not a regular file");
}
?>
</body>
</html>
|
Output:
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here