File "TP01.php"
Full Path: /home/analogde/www/Freebox/CHESS_ON/TP01.php
File size: 589 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
$image = "01.jpg";
$image = "C:\Logiciels/Internet\wamp\www\DEBUG_28_09_2015\01.jpg";
echo str_replace("/", " ", $image);
$image = "diaporama/img/bullets.gif";
//$image = "images/audio.gif";
list($width, $height, $type, $attr) = getimagesize($image);
$taille = format_size(filesize($image));
echo $taille;
function format_size($size) {
$sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
if ($size == 0) { return('n/a'); } else {
return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $sizes[$i]); }
}
?>