NOVINKA: Kurz kybernetickej bezpečnosti teraz už od 0 €. Staň sa žiadaným profesionálom. Zisti viac:
NOVINKA: Staň sa dátovým analytikom od 0 € a získaj istotu práce, lepší plat a nové kariérne možnosti. Viac informácií:

PHP - file_exists

Trieda

Koreň \ Bez triedy

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

Parametre

Žiadne

Má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

      Aktivity