PHP线程脚本已中止 [英] PHP Thread script Aborted

查看:73
本文介绍了PHP线程脚本已中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器(一个线程)每1小时运行一个php脚本。这个线程正在做的是,用户可以上传带有数据的excel文件,该线程将excel文件中的数据与数据库中的数据进行比较并执行某些操作(如果找不到的行,则与数据库中的某些插入无关)。要阅读excel文件,我打电话给:



I got a php script running every 1 hour on my server (a thread). What this thread is doing is, the user can upload excel files with data, the thread compares the data in the excel file with that in the database and does something (not relevant some inserts in the database if the found rows dont exist). To read the excel file i call the :

$data = new Spreadsheet_Excel_Reader();
$data->read($file);





用户可以在服务器上上传更多xls文件:File_1.xls,File_2.xls,File_3.xls我读取第一个文件获取所有数据做的所有比较做了所有插入这可能需要一段时间有时它超过6000行excel。我注意到,如果线程运行很长,例如他可以插入文件1和文件2和文件到一个像6000+行的大的我在我的错误日志中得到一个Abort。我认为这是excel读者的错。有什么想法吗?



the user can upload more xls files, on the server called: File_1.xls, File_2.xls ,File_3.xls i read the first file get all the data do all the compares do all the inserts this can take a while sometimes its over 6000 rows in excel. I noticed that if the thread runs to long, for example he can insert file 1 and file 2 and file to is a big one like 6000+ rows i get an Abort in my error log. I think it is the excel readers fault. Any ideas?

推荐答案

数据 = new Spreadsheet_Excel_Reader();
data = new Spreadsheet_Excel_Reader();


data-> read(
data->read(


file);





the用户可以上传更多xls文件,在服务器上调用:File_1.xls,File_2.xls,File_3.xls我读取第一个文件获取所有数据做的所有比较做所有插入这可能需要一段时间有时它超过6000行在excel中。我注意到,如果线程运行很长,例如他可以插入文件1和文件2和文件到一个像6000+行的大的我在我的错误日志中得到一个Abort。我认为这是excel读者的错。有什么想法?



the user can upload more xls files, on the server called: File_1.xls, File_2.xls ,File_3.xls i read the first file get all the data do all the compares do all the inserts this can take a while sometimes its over 6000 rows in excel. I noticed that if the thread runs to long, for example he can insert file 1 and file 2 and file to is a big one like 6000+ rows i get an Abort in my error log. I think it is the excel readers fault. Any ideas?


这篇关于PHP线程脚本已中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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