douqian3712 2012-01-08 17:12
浏览 15

PHP页面超时 - 我可以通过异步显示解决吗?

I have a PHP page that sends notification emails. When it sends out more than ~100 it times out. I'd like the page to work like Kayak so that the user can see progress occurring (so they will wait longer).

How can my page quickly load (preventing timeout) before sending the emails, then update as and when the process runs (e.g. as each email is sent a line gets written to the screen)?

  • 写回答

1条回答 默认 最新

  • doumi1912 2012-01-08 17:16
    关注

    You could do this with AJAX. Send an AJAX-request that sends out 50 (or any other number that fits into the timelimit) and echos out the result. When the request successfully finished send out the next AJAX-Request with a parameter called offset, that will be used to skip the first X datasets.

    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向