Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一个 PHP 脚本无限期地运行,但我似乎找不到一个好方法来做到这一点。我的服务器在 Windows Server 2008 上运行。
你认为我可以依靠定时器任务吗?有更好的选择吗?
提前致谢。
如果您需要脚本不断运行,而不是定期启动以执行它所做的任何工作,那么您需要它进入无限循环,因此:
while (1) { do_something(); sleep(1); };
不要省略该sleep()语句,除非您不介意脚本占用您的整个处理器。
sleep()
我正在尝试在 ebay 中嵌入 youtube 播放列表视频.. 到目前为止没有任何效果.. 不能使用 iframe 或
<iframe width="420" height="315" src="//www.youtube.com/embed/j-IV87qQ00M" frameborder="0" allo