PHP bestandsgrootte() Functie
❮ Referentie voor PHP-bestandssysteemVoorbeeld
Retourneer de bestandsgrootte voor "test.txt":
<?php
echo filesize("test.txt");
?>
Definitie en gebruik
De functie filesize() retourneert de grootte van een bestand.
Opmerking: het resultaat van deze functie wordt in de cache opgeslagen. Gebruik clearstatcache() om de cache te wissen.
Syntaxis
filesize(filename)
Parameterwaarden
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Technische details
Winstwaarde: | De bestandsgrootte in bytes bij succes, ONWAAR bij mislukking |
---|---|
PHP-versie: | 4.0+ |
❮ Referentie voor PHP-bestandssysteem