PDA

View Full Version : Schedule tasks help


TheSupportForum
10-20-2012, 10:30 PM
i need to run a schedule task to rename a file

so far i have this



$logfile = $vbulletin->options['aglogfile'];
$logurl = $vbulletin->options['aglogurl'];
$logname = $vbulletin->options['aglogname'];

echo "backup of your file

";
echo "Finished

";
rename ("$logurl/$logname","$logurl/$logname". date("d-M-Y", time()) . ".txt");
echo "C'est fini. You can view your logs
\n
";



the variables work but i get an error message


Warning: rename() [function.rename]: http wrapper does not support renaming


can anyone help on a better solution or help resolve the error message

kh99
10-20-2012, 10:52 PM
I think the problem is that you're trying to rename the file by refering to it with it's url, and you can't do that. You need to use the file system path (relative or absolute), like you would see in ftp or a command line.

TheSupportForum
10-20-2012, 11:24 PM
I think the problem is that you're trying to rename the file by refering to it with it's url, and you can't do that. You need to use the file system path (relative or absolute), like you would see in ftp or a command line.

thank you for your help lucky enough i had a $variable for full path to url
got it working many thx once again :)