PHP file upload (not common problem!)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
torli
Forum Newbie
Posts: 1
Joined: Sun Jun 01, 2008 4:40 pm

PHP file upload (not common problem!)

Post by torli »

Hi! (my first post here, so please be gentle)
I want to upload a file through html form and I want to know it's creation date/time.
I use this code:

Code: Select all

date ("F d Y H:i:s.", getlastmod($_FILES['uploadedfile']['tmp_name']));
but as you know it displays the creation date of uploaded file, not original one. I wonder is there any way to send to the server through html form the file and it's creation date/time. The file is a HTML-format file (so basically a txt one) and I cannot read it for example from EXIF (jpeg).

Any suggestions would be great!
Thx in advance for any help!
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PHP file upload (not common problem!)

Post by Benjamin »

This will not be possible as the browser doesn't send this information.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: PHP file upload (not common problem!)

Post by Weirdan »

It might be possible if you're using something other than just browser for file uploads, something that may ask user for access to file system, like signed java applet.
Post Reply