PHP编程逻辑查询
在这个社区的帮助下,我最近解决了 PHPExcel 通过 foreach()
读取多个文件的一些问题。现在看来我有逻辑问题。
我正在读取一些 Excel 文件并从中提取一些数据。该数据是学生的成绩。您可以检查稍微修改过的代码(由于引用问题,我没有将其粘贴到此处)。 $filelist
是一个数组,其中包含我选择的 $folder
中可用的文件名。
现在,虽然第一个和第四个结果向我显示了它们各自文件的值,但所有其他结果都没有(到目前为止我已经尝试过 24 个文件)。他们向我展示了第一个文件的结果。
您认为这里可能会发生什么?
我猜是我的操作方式有问题,但我无法找出原因。
预先非常感谢您。
PS:如果您需要更多数据,请告诉我。谢谢。
With the help of this community, I just recently solved some issues with PHPExcel reading multiple files through a foreach()
. Now it seems I've got logic issues.
I'm reading some excel files and extracting some data from them. This data are student grades. You can check a lightly modified code (I didn't paste it here because of quoting issues). $filelist
is an array with the filenames available in the $folder
I chose.
Now, while the first and fourth result show me the values of their respective files, all the other results do not (I've tried with 24 files so far). They show me the results from the first file.
What do you think might be happening here?
I guess it's a problem with the way I'm doing it, but I can't figure out the cause.
Thank you very much in advance.
PS: If you need any further data, please let me know. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一定是文件里的东西。我很难将所有文件重做为具有多个工作表的单个文件,并且该程序现在按预期工作。
It must have been something within the files. I had a hard time redoing all the files into a single file with multiple sheets, and the program now works as intended.