PHP Manual

PHP funkce file_exists()

2019-09-11T08:04:04.000Z

Obsah článku

Dostupnost ve verzích: PHP 4.0

Checks whether a file or directory exists

Parametry

Parametr Datový typ Výchozí hodnota Poznámka
$filename string není Path to the file or directory.

bool

true if the file or directory specified by
filename exists; false otherwise.

This function will return false for symlinks pointing to non-existing files.

This function returns false for files inaccessible due to safe mode restrictions. However these files still can be included if they are located in safe_mode_include_dir.


The check is done using the real UID/GID instead of the effective one.

Další zdroje

Oficiální dokumentace funkce file-exists

Jan Barášek   Více o autorovi

Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.

Rád vám pomůžu:

Související články

1.
336.

Potřebujete poradit s PHP?

Nabízím trénink vývojářů, konzultace, školení a analýzu návrhových vzorů. Osobně v Praze nebo online.

Napište mi, pokud si nevíte rady.

Lektor: Jan Barášek

V jiných jazycích

Status:
All systems normal.
2025