Ben zend framework kullanarak yükleme sırasında bir ProgressBar almak için uploadprogress uzantılı php 5.3.2 kullanıyorum. Zend ile sağlanan bile demo çalışmıyor. zend örnek kod -
if (isset($_GET['uploadId'])) {
set_include_path(realpath(dirname(__FILE__) . '/../../../library')
. PATH_SEPARATOR . get_include_path());
require_once 'Zend/ProgressBar.php';
require_once 'Zend/ProgressBar/Adapter/JsPull.php';
require_once 'Zend/Session/Namespace.php';
$data = uploadprogress_get_info($_GET['uploadId']);
$bytesTotal = ($data === null ? 0 : $data['bytes_total']);
$bytesUploaded = ($data === null ? 0 : $data['bytes_uploaded']);
$adapter = new Zend_ProgressBar_Adapter_JsPull();
$progressBar = new Zend_ProgressBar($adapter, 0, $bytesTotal, 'uploadProgress');
if ($bytesTotal === $bytesUploaded) {
$progressBar->finish();
} else {
$progressBar->update($bytesUploaded);
}
}
uploadprogress_get_info her zaman null döndürür. Ben bir şey bu yüzden http://labs.liip.ch/uploadprogresssimple/index.php mevcut çalışma örneği indirilen ama bile uploadprogress_get_info bu durumda her zaman null döndürür benim koduyla yanlış düşündüm.
Benim uploadprogress yapılandırma değerleri
uploadprogress desteği etkin
Sürüm 1.0.1
uploadprogress.file.contents_template / tmp / upload_contents_% s
uploadprogress.file.filename_template / tmp / upt_% s.txt
uploadprogress.get_contents 1
Etrafında Googling iken i uploadprogress uzatma Suhosin Patch < 0.9.26 ile bazı sorunu var ama ben Suhosin yama 0.9.9.1 kullanıyorum bulundu