File modified date/time changes when uploaded via FTP

Posted by Nate Shoffner on Stack Overflow See other posts from Stack Overflow or by Nate Shoffner
Published on 2010-06-12T17:59:58Z Indexed on 2010/06/12 18:02 UTC
Read the original article Hit count: 253

Filed under:
|
|
|

Hey /g/, FTP/PHP question here. On one of my pages I load .txt files from a directory. Pretty simple. I also display the modified date of the text file using this:

date('m/d/Y', filemtime($file));

This works fine on my WAMP server but when I upload the files via FTP, the modified date is changed to when they were uploaded. I'm currently hosting on a free hosting provider (freehostia to be exact). Is there any way to keep the modified date/time from changing when it's uploaded? Or is there perhaps an alternative way to go about this? Any ideas are appreciated.

© Stack Overflow or respective owner

Related posts about php

Related posts about file