Skip to main content

PHP File Handling: Examining File Details

Body

In this tutorial, I’m going to show how to get information about the file details. To start in this lesson lets create a new PHP file called “file_detail.php”. And add the following code:

  1. <?php $testfile = 'hello.txt';<br />
  2. echo filesize($testfile);// this will echo in byte</p>
  3. <p>//this next line are the mdifcation time, and its more than just number<br />
  4. //filemtime: last modified (changed content). and its the file modifiaction time<br />
  5. echo strftime('%m%d%Y %H:%M', filemtime($testfile)).'<br/?>';&#13;<br />
  6. //filectime: last changed (changed content or metadata)or the last change time of the content of metadata&#13;<br />
  7. echo

Add new comment