NOVINKA: Najžiadanejšie rekvalifikačné kurzy teraz s 50% zľavou + kurz AI ZADARMO. Nečakaj, táto ponuka dlho nevydrží! Zisti viac:

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