警告:缺少参数错误和PHP警告:curl_getinfo() - 需要

时间:2017-01-04 16:42:34

标签: php web error-handling warnings hosting

我收到以下错误:

  

* PHP警告:在第37行的G:... \ VideoConverter.class.php中缺少VideoConverter :: UpdateVideoDownloadProgress()的参数5

     

PHP警告:curl_getinfo()期望参数1为资源,G:... \ VideoConverter.class.php在第372行中给出整数*

我的PHP代码:

private function UpdateVideoDownloadProgress($curlResource, $downloadSize, $downloaded, $uploadSize, $uploaded)
    {
        $httpCode = curl_getinfo($curlResource, CURLINFO_HTTP_CODE);
        if ($httpCode == "200" && $downloadSize > 0)
        {
            $percent = round($downloaded / $downloadSize, 2) * 100;
            if ($percent > $this->_percentVidDownloaded)
            {
                $this->_percentVidDownloaded++;
                $this->OutputDownloadProgress($percent, true);
            }
        }
    }

    // Deprecated - May be removed in future versions!
    private function LegacyUpdateVideoDownloadProgress($downloadSize, $downloaded, $uploadSize, $uploaded)
    {
        $this->UpdateVideoDownloadProgress($this->_curlResource, $downloadSize, $downloaded, $uploadSize, $uploaded);
    }

    private function OutputDownloadProgress($percent, $isRealTime)
    {
        echo '<script type="text/javascript">updateVideoDownloadProgress("'. $percent .'", ' . (($isRealTime) ? 'true' : 'false') . ');</script>';
        $this->FlushBuffer();
    }

0 个答案:

没有答案
相关问题