bohughes1 Posted December 12, 2010 Share Posted December 12, 2010 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 More sharing options...
BlueSkyIS Posted December 12, 2010 Share Posted December 12, 2010 what is $FileName? is_file($FileName)??? Link to comment https://forums.phpfreaks.com/topic/221416-file-last-modify-date/#findComment-1146298 Share on other sites More sharing options...
bohughes1 Posted December 13, 2010 Author Share Posted December 13, 2010 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 Link to comment https://forums.phpfreaks.com/topic/221416-file-last-modify-date/#findComment-1146446 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.