Get File Details Script

Get File Details Script is use to when you upload the file to server in this file information will get and display for a user.

Demo :



 
File Name Is :  

File Statistics Is :

Warning: stat(): stat failed for upload_files/get-file-information-demo/ in /home/tutorialsscripts/public_html/free-php-scripts/file-and-directory-script/get-file-details.php on line 119
file type Is :

Warning: filetype(): Lstat failed for upload_files/get-file-information-demo/ in /home/tutorialsscripts/public_html/free-php-scripts/file-and-directory-script/get-file-details.php on line 121
File Size Is :

Warning: filesize(): stat failed for upload_files/get-file-information-demo/ in /home/tutorialsscripts/public_html/free-php-scripts/file-and-directory-script/get-file-details.php on line 123
is file readable?
This file is not readable
is file writable?
This file is not writable
is file executable?
This file is not executable

Example :

Just click Browse... button then select image or any one file and click Upload button then you will get file information below of demo form.

Code :

Following code is use to get file details from server if you need to copy and use to your website.


<?php
  $file_name = "file name";
  print_r ( stat ("upload_files/get-file-information-demo/$file_name"));
  echo filetype ("upload_files/get-file-information-demo/$file_name");
  echo filesize ("upload_files/get-file-information-demo/$file_name");

  echo is_readable("upload_files/get-file-information-demo/$file_name") ? "This file is readable\n" : "This file is not readable\n";
  echo is_writable ("upload_files/get-file-information-demo/$file_name") ? "This file is writable\n" : "This file is not writable\n";
  echo is_executable ("upload_files/get-file-information-demo/$file_name") ? "This file is executable\n" : "This file is not executable\n";
?>

In the above stat() function is use to get a file statistics from server and filetype() function is use to check a file or other types from server.filesize() function is use to get a file size from server. is_readable(),is_writable(),is_executable() are use to check the file is read,write and executable from server.

Free Download Script :

If you need Get File Details Script click and download from following link.

Download




Content