且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用PHP将CSV加载到MySQL表中

更新时间:2023-01-31 08:35:06

错误的原因是您发送给Web服务器的请求.网络服务器会尝试满足请求,并执行脚本来完成此操作(在您的情况下为PHP脚本).

The cause of the error is the request you've send to the webserver. The webserver tries to fulfill the request and executes scripts to do that, in your case, the PHP script.

PHP脚本现在失败. Web服务器仅知道它发生了故障,但是由于Web服务器不知道任何特定的信息,因此它只会返回所谓的内部服务器错误(内部发生错误),代码500.确切的错误信息是隐藏该错误,因为不会预料到该错误,并且内部信息也不应泄漏给外部世界.

The PHP script now fails. The webserver only knows it failed, but as the webserver does not know anything specific, it will only give back the so called Internal Server Error (the error happened internally), code 500. The exact error information is hidden because the error was not expected and no internal information should be leaked to the outside world.

仅从消息中,没人能说出发生了什么.您需要查看网络服务器的错误日志,并检查内部报告是什么.

From the message alone, nobody can say what happened. You need to look into the error log of your webserver and check what the internal reporting was.

在您的情况下,我认为您的PHP脚本有一个致命错误.您还可以启用PHP错误显示和日志记录,请参见 PHP不显示错误消息.

In your case I would assume that your PHP script has a fatal error. You can also enable PHP error display and logging, see PHP Does Not Display Error Messages.

执行此操作时,可能会看到更多错误消息.常见错误消息在我们的错误参考中进行了解释:参考-此错误在PHP中意味着什么?.

When you do that, you might see more error messages. Common happening error messages are explained in our error reference: Reference - What does this error mean in PHP?.

如果我应该猜测,那是因为您的PHP文件无法解析,所以您会看到此信息.最可能出现以下错误:

If I should place a guess, I'd say you're seeing this because your PHP file does not parse. Most likely the following error:

排除故障!