Updating 2012 date references to 2013 on html pages - resources?

2 replies
hi - it's that time of year again, and with 70+ handcoded dreamweaver sites and hundreds of pages, it's oh fun to go update the (c) 2012 to (c) 2013 on all my sites again.

now yes I'm slowly being dragged into wordpress themed sites, but for us oldtimers, any new fancy site-run cron job scripts or similar that do search and replaces for updating all references to 2012 within a site's html pages, to 2013?

thx,

k
#2012 #2013 #date #html #pages #references #resources #updating
  • Profile picture of the author IMDealBox
    Signature
    I.M Hound: Intelligent Business Solutions & I.M News
    {{ DiscussionBoard.errors[7444571].message }}
  • Profile picture of the author Valdor Kiebach
    run this from your server with the site files on it altering the path and regex as needed.

    Code:
    <?php
    foreach (glob("*.html") as filename)
    {
        file = file_get_contents(filename);
        file_put_contents(filename, preg_replace("/2012/","2013",file));
    }
    echo "done";
    ?>
    Dont forget to delete this file after using it.

    Each red word needs a $ before it the variables got deleted when posting the code so had to do it this way.
    {{ DiscussionBoard.errors[7444621].message }}

Trending Topics