当前位置: 首页>>代码示例>>PHP>>正文


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怎么用?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;
 }
开发者ID:henvic,项目名称:MediaLab,代码行数:14,代码来源:ProgressController.php

示例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;
开发者ID:jsnshrmn,项目名称:Suma,代码行数:31,代码来源:ZendForm.php


注:本文中的Zend_File_Transfer_Adapter_Http::getProgress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。