PHP dosya boyutu() İşlev
❮ PHP Dosya Sistemi ReferansıÖrnek
"test.txt" için dosya boyutunu döndürün:
<?php
echo filesize("test.txt");
?>
Tanım ve Kullanım
Dosya boyutu() işlevi, bir dosyanın boyutunu döndürür.
Not: Bu işlevin sonucu önbelleğe alınır. Önbelleği temizlemek için clearstatcache() kullanın .
Sözdizimi
filesize(filename)
Parametre Değerleri
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Teknik detaylar
Geri dönüş değeri: | Başarı durumunda bayt cinsinden dosya boyutu, başarısızlık durumunda FALSE |
---|---|
PHP Sürümü: | 4.0+ |
❮ PHP Dosya Sistemi Referansı