. . |
PHP:
$fi = fopen($file_name,"r");
$inf = stream_get_meta_data($fi);
fclose($fi);
$size_file=0;
$type_file="";
foreach($inf["wrapper_data"] as $vv) {
if (stristr($vv,"content-length")) {
$v = explode(":",$vv);
$size_file=trim($vv[1]);
}
if (stristr($vv,"content-type")) {
$v = explode(":",$vv);
$type_file=strtolower(trim($vv[1]));
}
}
: |