php完成某些操作的时候,可能需要较长的执行时间。这就需要设置他的执行时间,否则服务器会在执行时间超时后,停止执行,页面出现空白的情况。下面推荐两种解决方案:

php.ini配置文件设置(具体值,根据需要设置):
注意:如果执行内存完全满足的话,就不需要设置了。具体设置,根据情况灵活设置。
public static void main(String[] args) { long begain = System.currentTimeMillis();//开始系统时间 try { Thread.sleep(100); } catch (Exception e) { e.printStackTrace(); } long CheckTime = System.currentTimeMillis(); //判断时间 while(true){ System.out.println(CheckTime-begain); try { Thread.sleep(1000); } catch (Exception e) { e.printStackTrace(); } CheckTime = System.currentTimeMillis(); if((CheckTime-begain)>=(30*1000)){//判断时候到30秒 System.out.println("30秒后结束"); break; } } }给你的答案希望你能满意
; //设置不超时,程序一直运行。ignore_user_abort(true)
; //即使Client断开(如关掉浏览器),PHP脚本也可以继续执行.