PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

flock> <filesize
Last updated: Fri, 26 Sep 2008

view this page in

filetype

(PHP 4, PHP 5)

filetypePobiera typ pliku

Opis

string filetype ( string $nazwa_pliku )

Zwraca typ pliku. Możliwe wartości to fifo, char, dir, block, link, file i unknown.

Zwraca FALSE jeśli wystąpił błąd. filetype() również utworzy wiadomość E_NOTICE jeśli wywołanie stat się nie powiedzie lub gdy plik ma tym nieznany (unknown).

Informacja: Wyniki działania tej funkcji są buforowane. Zobacz opis funkcji clearstatcache() aby uzyskać więcej informacji.

Wskazówka

Od PHP 5.0.0 ta funkcja może być użyta także z niektórymi nakładkami URL. Zobacz List of Supported Protocols/Wrappers aby uzyskać listę nakładek, które obsługują funkcjonalność z rodziny stat().

Example #1 filetype() przykład

<?php

echo filetype('/etc/passwd');  // plik
echo filetype('/etc/');        // katalog

?>

Patrz także: is_dir(), is_file(), is_link(), file_exists(), stat() i mime_content_type().



add a note add a note User Contributed Notes
filetype
ruach at chpc dot utah dot edu
11-Mar-2004 02: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: Fri, 26 Sep 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites