vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Schedule tasks help (https://vborg.vbsupport.ru/showthread.php?t=289392)

TheSupportForum 10-20-2012 10:30 PM

Schedule tasks help
 
i need to run a schedule task to rename a file

so far i have this

PHP Code:


$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

PHP Code:

Warningrename() [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

Quote:

Originally Posted by kh99 (Post 2374647)
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 :)


All times are GMT. The time now is 03:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00967 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete