PHP funkce file_exists()
06. 07. 2020Dostupnost ve verzích: PHP 4.0
Checks whether a file or directory exists
Parametry
Parametr | Datový typ | Výchozí hodnota | Poznámka |
---|---|---|---|
$filename | string | Path to the file or directory. |
Návratové hodnoty
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
https://php.net/manual/en/function.file-exists.php
Jan Barášek Více o autorovi
Autor článku podniká jako fullstack senior developer v Praze. Spravuje 300 různě velkých webových projektů, fungujících dodnes. Během spolupráce nabral hluboké zkušenosti, které na tomto webu předává dál.
Rád vám pomůžu:
Kontakt Konzultace a služby Nabídka spolupráce