Php Qt QNetworkReply下载进度ByTestTotal=-1
Php Qt QNetworkReply下载进度ByTestTotal=-1,php,qt,download,Php,Qt,Download,我每次都收到ByTestTotal=-1。我尝试了标题('Content-Length:'。strlen($Content))在我的php文件中,但没有结果什么php标题或其他东西可以帮助您?解决方案标题是: void QNetworkReply::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) [signal] // The bytesReceived parameter indicates the number of by
我每次都收到ByTestTotal=-1。我尝试了
标题('Content-Length:'。strlen($Content))代码>在我的php文件中,但没有结果
什么php标题或其他东西可以帮助您?解决方案标题是:
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.
header("Content-type: application/octet-stream");
header("Content-length: ".strlen($content));