Page 1 of 1

Cron php

Posted: Wed Jan 21, 2009 11:23 pm
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

Re: Cron php

Posted: Wed Jan 21, 2009 11:28 pm
by Burrito
take a look at date()

Re: Cron php

Posted: Thu Jan 22, 2009 4:03 am
by kjason
Thanks Burrito for help.