Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

filetype

(PHP 3, PHP 4, PHP 5)

filetype -- Получить тип файла

Описание

string filetype ( string filename )

Возвращает тип файла. Возможными значениями являются fifo, char, dir, block, link, file и unknown.

Возвращает FALSE в случае возникновения ошибки. filetype() также вызовет сообщение E_NOTICE при неудачной попытке получения информации о файле или если тип файла неизвестен.

Замечание: Результаты этой функции кэшируются. Более подробную информацию смотрите в разделе clearstatcache().

Подсказка: Начиная с PHP 5.0.0, эта функция также может быть использована с некоторыми упаковщиками url. Список упаковщиков, поддерживаемых семейством функций stat(), смотрите в Прил. M.

Пример 1. Пример использования функции filetype()

<?php

echo filetype('/etc/passwd');  // file
echo filetype('/etc/');        // dir

?>

См. также описание функций is_dir(), is_file(), is_link(), file_exists(), stat() и mime_content_type().



add a note add a note User Contributed Notes
filetype
ruach at chpc dot utah dot edu
10-Mar-2004 05:11
There are 7 values that can be returned. Here is a list of them and what each one means

block: block special device

char: character special device

dir: directory

fifo: FIFO (named pipe)

file: regular file

link: symbolic link

unknown: unknown file type

flock> <filesize
Last updated: Sat, 27 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571