- Version
- Download 186
- File Size 397.07 KB
- File Count 1
- Create Date September 14, 2016
- Last Updated September 14, 2016
Get the filesize and file extension of a file in PHP
Get the filesize and file extension of a file in PHP
PHP script that will get the file size and file extension of the uploaded file.
PHP Script:
< ?php
if(isset($_POST['save']))
{
$name = basename($_FILES['upload_file']['name']);
$temp = $_FILES['upload_file']['tmp_name'];
$filetype = $_FILES['upload_file']['type'];
$size = $_FILES['upload_file']['size'];
echo "The filetype is: ".$filetype."< br>";
echo "The filesize is: ".$size;
}
?>