Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有用于报废的 PHP 脚本并在 CSV 文件中写入大量数据。它正在工作,但在 CSV 中写入一些数据后,它会停止写入,而不会在屏幕上显示任何错误。但浏览器显示脚本连续运行。
我已经使用无限设置了 php 脚本的时间限制set_time_limit(0)
set_time_limit(0)
我该如何调试这个问题?有什么可能的原因?请建议。
提前致谢
编辑
一旦我注意到,它会在 1 小时后停止写入。
error_reporting(E_ALL); ini_set("display_errors", 1);
您的脚本可能分配了太多内存。您可以尝试只编写一个小的 CVS。如果它也失败了,你应该会得到一个错误......