file_exists
Check if the file or directory exists
file_exists()
function checks whether a file or directory exists.
Return true if the specified file or directory exists, otherwise return false.
<?php echo file_exists ( "test.txt" ) ; ?>
Output:
1
file_exists ( path )
parameter | Description |
---|---|
path | Required. Specify the path to be checked. |