The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Scheduled Task Help
Hi i need support with this scheduled task
rename("$logfile/$logname", "$logfile/backup/$logname" . date("d-M-Y", time()) . ".txt");; the issue is as follows 1) original filename from $logname is log.txt 2) after rename it become tenhbyuu.txt04-Nov-2012.txt so what im looking for is a solutions to do 2) renamed to tenhbyuu-04-Nov-2012.txt the reason i am using a $logname is to allow users to choose log name, i am am still looking to keep rename("$logfile/$logname", "$logfile/backup/$logname" in place |
#2
|
|||
|
|||
I'm not sure I follow completely - you want to remove the ".txt" from the middle of the name? Maybe something like:
Code:
rename("$logfile/$logname", "$logfile/backup/" . substr($logname, 0, -4) . '-' . date("d-M-Y", time()) . ".txt"); |
#3
|
|||
|
|||
tried it, but nothing happened, it did not create any backup file
|
#4
|
|||
|
|||
OK, sorry, there was a mistake in the code which I've fixed above. I think it would have created a file in the backup directory with a name starting with ".txt", which would be hidden on a linux system, so if you need that file it might still be there.
|
#5
|
|||
|
|||
Quote:
--------------- Added [DATE]1352296655[/DATE] at [TIME]1352296655[/TIME] --------------- thank you once again kh99 it works now how i want it too |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|