void QNetworkReply::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) [signal]
// The bytesReceived parameter indicates the number of bytes received, while bytesTotal indicates the total number of bytes expected to be downloaded. If the number of bytes to be downloaded is not known, bytesTotal will be -1.
我每次都收到bytesTotal = -1。我在我的php文件中尝试了header('Content-Length: '.strlen($content));
但没有结果。什么php标题或其他什么可以帮助?
答案 0 :(得分:0)
解决方案标题是:
header("Content-type: application/octet-stream");
header("Content-length: ".strlen($content));