How to use Filesystem file exists in PHP
In this article I am going to explain about file_exists function in PHP.
PHP file_exists() function
The filesystem file_exists function checks whether a file or directory exists or not. This function returns true on success otherwise it returns false.
Syntax of file_exists function
Parameters in file_exists function
It have three parameter:
Parameter |
Description |
file |
It specifies the file path. |
Example of filesystem file_exists function
<html>
<body>
<?php
echo "It returns true:";
echo file_exists("C:\wamp\www\Dinesh\PhpIntro.txt");
?>
</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