Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 854693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:57:55+00:00 2026-05-15T07:57:55+00:00

FTP/PHP question here. On one of my pages I load .txt files from a

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:57:55+00:00Added an answer on May 15, 2026 at 7:57 am

    There’s an option in most FTP clients to preserve modification times of files when uploaded — hunt around your options for it. I know FileZilla and WinSCP at least support this. Only some FTP servers will acknowledge this, though.

    If your server doesn’t support it, you’ll have to come up with some other method to do what you’re doing. In the long run I’d recommend finding some other way anyway, because typically the last modified time isn’t a “critical” piece of data that is always kept in sync across backups, file transfers, etc. If the date is stored (for example) in the file, you’ll never have to worry about losing it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new here. I've got a question related to PHP, FTP and CURL. I
Is it possible to stream an FTP upload with PHP? I have files I
I want to list all files on an FTP server using PHP. According to
I'm writing an object in PHP that displays files on an FTP server. I
I come from a PHP/Rails background where deploying a website often means FTP/Checkout of
I apologize in advance for the fairly simple question. I am familiar with PHP,
I need to write a php script which is called by a setInterval( ajaxrequest('ftp.php',
I'm trying to use ftp_connect('ftp.is.co.za') [for example] in PHP 5 or higher (multiple different
I FTP source code files and then take a dump of the database (with
http://ftp.crashboxcreative.com/ftp/EastsideBaptist/EBC-Final/ I'm having a lot of trouble with a simple jquery show/hide effect. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.