当同一个php文件多次运行时,如何避免连接超时 [英] How can I avoid connection timeout when the same php file runs multiple times

查看:62
本文介绍了当同一个php文件多次运行时,如何避免连接超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请使用我要构建的 php 脚本获取您的帮助.我创建了此脚本以将多个短信发送给某些收件人.所有数据都存储在数据库表中(数据> 1500行).我使用 select 查询以及 LIMIT 0,1 .当消息消失时,我删除特定的行,然后再次 include 该文件以继续进行下一个 row .问题是,当 = 300时,我有一个连接超时错误.请让我知道如何解决此问题,或者是否有其他方法可以解决此问题.

Please I need your help with a php script I am trying to build. I have created this script to send multiple sms to some recipients.All data are stored into a database table (data > 1500 rows).I use select query with LIMIT 0, 1. When the message goes I delete the specific row and I include the file again to proceed to the next row. The problem is that at the time the rows = 300 I have a CONNECTION TIMEOUT ERROR. Please let me know how can I solve this or if there is another way to figure this out..

推荐答案

您需要根据需要在 php.ini 文件中更改这两行

You need to change in your php.ini file these two lines based on your requiredment

 max_execution_time = 60;  // sec

或将此行放在页面顶部

set_time_limit(100);   // Sec

这篇关于当同一个php文件多次运行时,如何避免连接超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆