Jump to content


php exec question

  • Please log in to reply
1 reply to this topic

#1 pkrtech

  • Members
  • PipPip
  • Member
  • 14 posts

Posted 25 August 2006 - 07:43 AM

I am using

exec( 'wget http://www.test.com/run.php > /dev/null &' );

to run a background process being called from a php page, it runs fine. However everytime it runs it places a empty run.php.1, run.php.2 ect ect. Now the script can run like 25 times an hour so thats alot of files I have to delete to clean up.

Is there some way to make it so it doesnt add the file ?

#2 trq

  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 August 2006 - 07:46 AM

This will download the file once, then for each additional hit, will rewrite to that same file.
exec( 'wget -r http://www.test.com/run.php > /dev/null &' );

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users