Php to "touch" a file, ie update time stamp?

Discussion in 'PHP' started by corb, Apr 25, 2008.

  1. #1
    Hey guys
    I'm trying to figure out how to "touch" a file (ie, update it's timestamp).
    Currently I'm doing it by appending a blank character to the end of my php file then saving it. But this of course isn't optimal

    Does anyone know of a way to update the time stamp with php?

    Thanks!
     
    corb, Apr 25, 2008 IP
  2. corb

    corb Peon

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    figured it out:

    <?php

    touch("index.php");

    ?>
     
    corb, Apr 25, 2008 IP