11Tami Posted November 16, 2006 Share Posted November 16, 2006 Hello, does anyone know how to add a javascript setTimout to this? So that this include will re execute after so much time...Or is there a php refresh command I can add to this code itself, not the page.Please let me know, thanks, Tami<?php include 'file.php'; ?> Quote Link to comment Share on other sites More sharing options...
printf Posted November 16, 2006 Share Posted November 16, 2006 Anything that you might think of to try to accomplish this will not work in the way I am thinking you are wanting. Script execution is done line by line so maybe doing sleep() or usleep() might help you, but that will stop execution of the rest of the script until the sleep() or usleep() is done, the only way to allow for continuing and the execution to take place is maybe forking or threading in windows, but both of those will not allow the include to be really included into the current script process, so if your doing some back-end process it would be fine, but if you need function and variable scope from that include to be part of the current script process, then sleep() or usleep() would be the only way. Quote Link to comment Share on other sites More sharing options...
11Tami Posted November 16, 2006 Author Share Posted November 16, 2006 Thanks, I read up on those commands and I must be missing something. They sound like they stop the script after so many seconds is that correct?Is there any php command to keep the script going or re-executing after so many seconds? It sure seems like there would be. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.