本文整理汇总了PHP中Zend_File_Transfer_Adapter_Http::getProgress方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_File_Transfer_Adapter_Http::getProgress方法的具体用法?PHP Zend_File_Transfer_Adapter_Http::getProgress怎么用?PHP Zend_File_Transfer_Adapter_Http::getProgress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_File_Transfer_Adapter_Http
的用法示例。
在下文中一共展示了Zend_File_Transfer_Adapter_Http::getProgress方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uploadAction
public function uploadAction()
{
header("Content-Type: application/json");
if (!is_null(filter_input(INPUT_GET, "push", FILTER_UNSAFE_RAW))) {
$adapter = new Zend_ProgressBar_Adapter_JsPush(array('updateMethodName' => 'Zend_ProgressBar_Update', 'finishMethodName' => 'Zend_ProgressBar_Finish'));
do {
$progress = Zend_File_Transfer_Adapter_Http::getProgress(array('progress' => $adapter));
} while (!$progress['done']);
} else {
$adapter = new Zend_ProgressBar_Adapter_JsPull();
Zend_File_Transfer_Adapter_Http::getProgress(array('progress' => $adapter));
}
exit;
}
示例2: set_include_path
* @package Zend_ProgressBar
* @subpackage Demos
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/**
* This sample file demonstrates an advanced use case of Zend_ProgressBar with
* Zend_Form and Zend_File_Transfer.
*/
set_include_path(realpath(dirname(__FILE__) . '/../../../library') . PATH_SEPARATOR . get_include_path());
if (isset($_GET['progress_key'])) {
require_once 'Zend/File/Transfer/Adapter/Http.php';
require_once 'Zend/ProgressBar.php';
require_once 'Zend/ProgressBar/Adapter/JsPull.php';
$adapter = new Zend_ProgressBar_Adapter_JsPull();
Zend_File_Transfer_Adapter_Http::getProgress(array('progress' => $adapter));
die;
}
?>
<html>
<head>
<title>Zend_ProgressBar Upload Demo</title>
<style type="text/css">
iframe {
position: absolute;
left: -100px;
top: -100px;
width: 10px;
height: 10px;
overflow: hidden;