如果php运行超时怎么返回超时错误给前端

更新时间:02-09 教程 由 冷兮め 分享

如果php运行超时怎么返回超时错误给前端?

返回前端只适用于是使用AJAX进行加载的。var res = $.ajax({ url:'xxxxxx/index.php', timeout : 1000, //超时时间设置,单位毫秒 complete : function(xhr,status){ if(status=='timeout'){ // 超时处理 } }});

声明:关于《如果php运行超时怎么返回超时错误给前端》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/tutorial/14_2315203.html