Scummy12 Posted November 25, 2010 Share Posted November 25, 2010 Hello, I need help in making my script loop indefinitely. Any ideas? Link to comment https://forums.phpfreaks.com/topic/219821-make-a-script-repeat/ Share on other sites More sharing options...
mort Posted November 25, 2010 Share Posted November 25, 2010 pretty vague, depends what the script should do. obviously scripts that run forever are bad due to execution and memory limits sounds like you want to run a script that will run a batch, and then set it to repeat using CRON jobs Link to comment https://forums.phpfreaks.com/topic/219821-make-a-script-repeat/#findComment-1139522 Share on other sites More sharing options...
robert_gsfame Posted November 25, 2010 Share Posted November 25, 2010 dont get what you mean..are you going to send some bulk email to your enemy, arent you? Link to comment https://forums.phpfreaks.com/topic/219821-make-a-script-repeat/#findComment-1139524 Share on other sites More sharing options...
laffin Posted November 25, 2010 Share Posted November 25, 2010 myloop.php <?php echo "Hello World!"; ?> main.php function mainloop() { require_once('myloop.php'); } while(1) { mainloop(); } about only problem with this setup, is that your loop code loses access to the variables such as $_GET/$_POST etc etc etc Link to comment https://forums.phpfreaks.com/topic/219821-make-a-script-repeat/#findComment-1139528 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.