Comunitatea PHP Romania
 

 
filesize

filesize

(PHP 3, PHP 4 , PHP 5)

filesize -- Gets file size

Description

int filesize ( string filename)

Returns the size of the file in bytes, or FALSE in case of an error.

Notã: Because PHP's integer type is signed and many platforms use 32bit integers, filesize() may return unexpected results for files which are larger than 2GB. For files between 2GB and 4GB in size this can usually be overcome by using sprintf("%u", filesize($file)).

Notã: The results of this function are cached. See clearstatcache() for more details.

Indicaþie: As of PHP 5.0.0 this function can also be used with some URL wrappers. Refer to Anexa L for a listing of which wrappers support stat() family of functionality.

Exemplu 1. filesize() example

<?php

// outputs e.g.  somefile.txt: 1024 bytes

$filename = 'somefile.txt';
echo
$filename . ': ' . filesize($filename) . ' bytes';

?>

See also file_exists()

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
acasa , in pat
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
Mascka Mascka
Braila
raul_ raul_
whooper whooper
Toronto ON
mihaitha mihaitha
Sibiu
gabysolomon gabysolomon
Bacau
oriceon oriceon
Constanta
garlicinicolae garlicinicolae

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Mortgages | Cheap Car Insurance | Learn real Kung Fu | Pay Day Loans | Newquay short breaks
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis