The Flash and PHP Bible has been released! The book can be found on Amazon or wherever fine books are sold in your area. This book explains the process of working with PHP in Flash, while creating real world examples that you can actually learn something from.
The Flash and PHP Bible has a dedicated forum for support and comments.
This tutorial will show you how to display the date/time that the file was last modified.
Here you go, I commented each line, if you have a question don't hesitate to ask.
<?php
// The file to that will read.
$file = 'thefile.php';
// The variable that holds the function to display the date modified info.
$last_time_modified = filemtime($file);
// Format that time and date into a human readable format
$last_mod = "Page last edited " . date("m/j/y h:i", $last_time_modified);
// print the new formatted string and display the last modified info.
//You could also pass the "$last_mod" variable to another piece of your script
print $last_mod;
?>
That is the end of the tutorial. I hope you have an understanding of how "filemtime" works.
©2004 - 2008 scriptplayground | Privacy Policy | Legal
Validate Site: XHTML CSS | Designed by: mkeefeDESIGN |