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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.