SQL PHP HTML ASP JavaScript articles and free scripts to download
 

Automatically displaying last modified date of the current file

We can generate the last modified date or the updating date of any file and display it for visitors. This system will work on its own without any extra effort. The code for the will be generated by using the code to get the current file name and then getting the last modification time of the file by using filemtime() function.

Here is the code. This code can be added to any file. Before using this you can read the tutorials on how to get the file name and filemtime() function.
$file = $_SERVER["SCRIPT_NAME"];
    $break = Explode('/', $file);
    $pfile = $break[count($break) - 1]; 
//echo $pfile;
echo "This file was last modified on: " .date("d/m/Y",filemtime($pfile));
Similar script can be developed for getting last modified date by using ASP



Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Join Our Email List
Email:  
For Email Newsletters you can trust
File handling
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2013 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer