PHP - file_exists
Trieda
Metóda - file_exists
(PHP 4, PHP 5, PHP 7)
Determines the existence of a given file or directory.
Note: Results returned by this function are cached, see the
clearstatcache() function for more information.
Procedurálne
- function file_exists () : bool
Parametre
ŽiadneMávratovej hodnoty
Vracia: bool
Returns true if specified directory or file exists,
false otherwise.
Príklady
<?php
$filename = '/some/file.txt';
echo file_exists($filename) ? 'File exists.' : 'File does not exist.';
?>
Súvisiace manuály
- function is_readable (string $filename) : bool
