- Php does path exist
- PHP FTP Functions
- PHP JASON
- PHP Math Functions
- PHP GMP Functions
- PHP MySQLi Functions
- PHP String Functions
- PHP Network Functions
- PHP IntlChar Functions
- PHP Image Processing and GD Functions
- PHP Gmagick Functions
- PHP Imagick Functions
- PHP ImagickDraw Functions
- PHP DsDeque Functions
- PHP DsMap Functions
- PHP DSSequence Functions
- PHP DSVector Functions
- PHP DsStack Functions
- PHP DsQueue Functions
- PHP DsPriorityQueue Functions
- PHP SPL Data structures
- PHP Basics
- PHP Advance
- PHP Array Functions
- PHP Calendar Functions
- PHP Date/Time Functions
- PHP Directory Functions
- PHP Error
- PHP FTP Functions
- PHP JASON
- PHP Math Functions
- PHP GMP Functions
- PHP MySQLi Functions
- PHP String Functions
- PHP Network Functions
- PHP IntlChar Functions
- PHP Image Processing and GD Functions
- PHP Gmagick Functions
- PHP Imagick Functions
- PHP ImagickDraw Functions
- PHP DsDeque Functions
- PHP DsMap Functions
- PHP DSSequence Functions
- PHP DSVector Functions
- PHP DsStack Functions
- PHP DsQueue Functions
- PHP DsPriorityQueue Functions
- PHP SPL Data structures
- file_exists
- Возвращаемые значения
- Примеры
- Ошибки
- Примечания
- Смотрите также
Php does path exist
- PHP basename( ) Function
- PHP chgrp( ) Function
- PHP chmod( ) Function
- PHP chown( ) Function
- PHP copy( ) Function
- PHP dirname( ) Function
- PHP disk_free_space( ) Function
- PHP disk_total_space( ) Function
- PHP feof( ) Function
- PHP fflush( ) Function
- PHP | fgetc( ) Function
- PHP | fgets( ) Function
- PHP | fgetss( ) Function
- PHP | file_exists( ) Function
- PHP file_get_contents() Function
- PHP Filesystem Functions Complete Reference
PHP FTP Functions
- PHP | ftp_alloc() function
- PHP | ftp_chdir() function
- PHP | ftp_close() function
- PHP | ftp_connect() function
- PHP | ftp_delete() function
- PHP | ftp_exec() function
- PHP | ftp_get() function
- PHP | ftp_put() function
- PHP | ftp_get_option() function
- PHP | ftp_login() function
- PHP | ftp_mdtm() Function
- PHP | ftp_mkdir() function
PHP JASON
PHP Math Functions
PHP GMP Functions
PHP MySQLi Functions
PHP String Functions
PHP Network Functions
PHP IntlChar Functions
PHP Image Processing and GD Functions
PHP Gmagick Functions
PHP Imagick Functions
PHP ImagickDraw Functions
PHP DsDeque Functions
PHP DsMap Functions
- PHP | Ds\Map allocate() Function
- PHP | Ds\Map apply() Function
- PHP | Ds\Map capacity() Function
- PHP | DS\Map clear() Function
- PHP | Ds\Map __construct() Function
- PHP Ds\Map copy() Function
- PHP | Ds\Map count() Function
- PHP | Ds\Map diff() Function
- PHP | Ds\Map filter() Function
- PHP | Ds\Map first() Function
- PHP Ds\Map Functions Complete Reference
PHP DSSequence Functions
PHP DSVector Functions
PHP DsStack Functions
PHP DsQueue Functions
PHP DsPriorityQueue Functions
PHP SPL Data structures
- SplDoublyLinkedList in PHP
- PHP SplDoublyLinkedList add() Function
- PHP SplDoublyLinkedList bottom() Function
- PHP SplDoublyLinkedList count() function
- PHP SplFixedArray count() Function
- PHP SplFixedArray current() Function
- PHP SplFixedArray getSize() Function
- PHP SplFixedArray key() Function
- PHP SplObjectStorage addAll() Function
- PHP SplObjectStorage attach() Function
- PHP SplObjectStorage contains() Function
- PHP SplObjectStorage count() Function
- PHP SplQueue::__construct() Function
- PHP SPL Data structures Complete Reference
PHP Basics
- PHP Tutorial
- PHP | Introduction
- PHP Full Form
- How to set PHP development environment in windows ?
- LAMP installation and important PHP configurations on Ubuntu
- PHP | Coding Standards
- PHP | Basic Syntax
- PHP | Variables
- PHP echo and print
- PHP | Data Types
- PHP | Strings
- PHP | Constants
- PHP | Magic Constants
- PHP | Decision Making
- PHP | Loops
- PHP | Superglobals
- PHP | Regular Expressions
- PHP Examples
PHP Advance
- Describe PHP Include and Require
- PHP | Basics of File Handling
- PHP | fopen( ) (Function open file or URL)
- PHP fread( ) Function
- PHP fclose( ) Function
- PHP | fwrite( ) Function
- PHP | Uploading File
- PHP Cookies
- PHP | Sessions
- PHP Filter and Filter Constant
- Implementing callback in PHP
- Exception Handling in PHP
PHP Array Functions
- PHP | Arrays
- PHP array() Function
- PHP | array_change_key_case() Function
- PHP array_chunk() Function
- PHP | array_column() Function
- PHP array_combine() Function
- PHP array_count_values() Function
- PHP array_diff() function
- PHP array_diff_assoc() Function
- PHP array_diff_key() Function
- PHP array_diff_uassoc() Function
- PHP array_diff_ukey() Function
- PHP array_fill() function
- PHP array_fill_keys() Function
- PHP Array Functions Complete Reference
PHP Calendar Functions
PHP Date/Time Functions
- PHP Date and Time
- PHP | checkdate() Function
- PHP | date_create(), date_format(), date_add() Functions
- PHP | date_create_from_format() Function
- PHP | date_date_set() Function
- PHP | date_default_timezone_get() Function
- PHP | date_default_timezone_set() Function
- PHP | date_diff() Function
- PHP | date_get_last_errors() Function
- PHP | date_isodate_set() Function
- PHP | date_modify() Function
- PHP | date_offset_get() Function
- PHP | date_parse_from_format() Function
- PHP | date_parse() Function
- PHP | date_sub() Function
PHP Directory Functions
PHP Error
- PHP basename( ) Function
- PHP chgrp( ) Function
- PHP chmod( ) Function
- PHP chown( ) Function
- PHP copy( ) Function
- PHP dirname( ) Function
- PHP disk_free_space( ) Function
- PHP disk_total_space( ) Function
- PHP feof( ) Function
- PHP fflush( ) Function
- PHP | fgetc( ) Function
- PHP | fgets( ) Function
- PHP | fgetss( ) Function
- PHP | file_exists( ) Function
- PHP file_get_contents() Function
- PHP Filesystem Functions Complete Reference
PHP FTP Functions
- PHP | ftp_alloc() function
- PHP | ftp_chdir() function
- PHP | ftp_close() function
- PHP | ftp_connect() function
- PHP | ftp_delete() function
- PHP | ftp_exec() function
- PHP | ftp_get() function
- PHP | ftp_put() function
- PHP | ftp_get_option() function
- PHP | ftp_login() function
- PHP | ftp_mdtm() Function
- PHP | ftp_mkdir() function
PHP JASON
PHP Math Functions
PHP GMP Functions
PHP MySQLi Functions
PHP String Functions
PHP Network Functions
PHP IntlChar Functions
PHP Image Processing and GD Functions
PHP Gmagick Functions
PHP Imagick Functions
PHP ImagickDraw Functions
PHP DsDeque Functions
PHP DsMap Functions
- PHP | Ds\Map allocate() Function
- PHP | Ds\Map apply() Function
- PHP | Ds\Map capacity() Function
- PHP | DS\Map clear() Function
- PHP | Ds\Map __construct() Function
- PHP Ds\Map copy() Function
- PHP | Ds\Map count() Function
- PHP | Ds\Map diff() Function
- PHP | Ds\Map filter() Function
- PHP | Ds\Map first() Function
- PHP Ds\Map Functions Complete Reference
PHP DSSequence Functions
PHP DSVector Functions
PHP DsStack Functions
PHP DsQueue Functions
PHP DsPriorityQueue Functions
PHP SPL Data structures
- SplDoublyLinkedList in PHP
- PHP SplDoublyLinkedList add() Function
- PHP SplDoublyLinkedList bottom() Function
- PHP SplDoublyLinkedList count() function
- PHP SplFixedArray count() Function
- PHP SplFixedArray current() Function
- PHP SplFixedArray getSize() Function
- PHP SplFixedArray key() Function
- PHP SplObjectStorage addAll() Function
- PHP SplObjectStorage attach() Function
- PHP SplObjectStorage contains() Function
- PHP SplObjectStorage count() Function
- PHP SplQueue::__construct() Function
- PHP SPL Data structures Complete Reference
file_exists
На платформах Windows, для проверки наличия файлов на сетевых ресурсах, используйте имена, подобные //computername/share/filename или \\computername\share\filename .
Возвращаемые значения
Возвращает TRUE , если файл или каталог, указанный параметром filename , существует, иначе возвращает FALSE .
Замечание:
Данная функция возвращает FALSE для символических ссылок, указывающих на несуществующие файлы.
Если файлы недоступны из-за ограничений, налагаемых безопасным режимом, то данная функция вернет FALSE . Однако, эти файлы все еще могут быть подключены, если они располагаются в каталоге safe_mode_include_dir.
Замечание:
Проверка происходит с помощью реальных UID/GID, а не эффективных идентификаторов.
Замечание: Так как тип integer в PHP является целым числом со знаком и многие платформы используют 32-х битные целые числа, то некоторые функции файловых систем могут возвращать неожиданные результаты для файлов размером больше 2ГБ.
Примеры
Пример #1 Проверка существования файла
if ( file_exists ( $filename )) echo «Файл $filename существует» ;
> else echo «Файл $filename не существует» ;
>
?>
Ошибки
В случае неудачного завершения работы генерируется ошибка уровня E_WARNING .
Примечания
Замечание: Результаты этой функции кэшируются. Более подробную информацию смотрите в разделе clearstatcache() .
Начиная с PHP 5.0.0, эта функция также может быть использована с некоторыми обертками url. Список оберток, поддерживаемых семейством функций stat() , смотрите в Поддерживаемые протоколы и обработчики (wrappers).
Смотрите также
- is_readable() — Определяет существование файла и доступен ли он для чтения
- is_writable() — Определяет, доступен ли файл для записи
- is_file() — Определяет, является ли файл обычным файлом
- file() — Читает содержимое файла и помещает его в массив