Cron php

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
kjason
Forum Newbie
Posts: 3
Joined: Wed Jan 21, 2009 7:11 am

Cron php

Post by kjason »

May I ask for a help???
Line number On/Off | Expand/Contract

Code: Select all

 
<?php
$file = '/home/xxxx/public_html/index.htm';
$newfile = '/home/xxxx/public_html/bkb/2009/01/index.htm.bkb';
if (!copy($file, $newfile)) {
    echo "failed to copy $file...\n";
}
else
{
   echo "Index Copied";
}
 
 
So the file copied and named index.htm.bkb, please I need some help to let the name to be like that the date.index.htm.bkb
Where the date in this format d.m.y
Thanks in advance
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Re: Cron php

Post by Burrito »

take a look at date()
kjason
Forum Newbie
Posts: 3
Joined: Wed Jan 21, 2009 7:11 am

Re: Cron php

Post by kjason »

Thanks Burrito for help.
Post Reply