2013-06-20 58 views
0
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头或其他东西可以帮助?Qt QNetworkReply downloadProgress bytesTotal = -1

回答

0

溶液头是:

header("Content-type: application/octet-stream"); 
header("Content-length: ".strlen($content));