Jump to content

File last modify date


bohughes1

Recommended Posts

I’m new to php and would like to put image dates into a table as the images change. I have the following code in my javascript. The intent is to pass a new file name each time it is called.

x[1].innerHTML = "<?php echo date ('F d Y H:i:s.', filemtime($FileName)); ?>";

Now all I get is December 31 1969 19:00:00. Is it possible to pass a $FileName this way?

 

Bob

 

 

Link to comment
https://forums.phpfreaks.com/topic/221416-file-last-modify-date/
Share on other sites

Sorry I was not clear. I am not familiar with the terminology. I have a html file using javascript that presents a slide show of several images. I would like to  display the date/time of last modification date along with the file name. My test program and images produced by a camera can be seen here <http://www.treeful.com/webcam/slideshow1.html> I just learned the PHP code" date ('F d Y H:i:s.', filemtime('filename.jpg'))" produces what I need, but do not know how to call a php function from javascript, passing an argument & returning a value. So I was trying this in line code.

The camera detects motion, uploads the images & rotates through 1024 images. Normally I would only run this when no one is  home.

Bob

PS this program is still under development so is not well documented

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.