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


PHP UploadHandler::initialize方法代码示例

本文整理汇总了PHP中UploadHandler::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP UploadHandler::initialize方法的具体用法?PHP UploadHandler::initialize怎么用?PHP UploadHandler::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UploadHandler的用法示例。


在下文中一共展示了UploadHandler::initialize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initialize

 protected function initialize()
 {
     if ($this->get_server_var("REQUEST_METHOD") == "GET" && isset($_GET["delete"])) {
         $this->delete();
     } else {
         parent::initialize();
     }
 }
开发者ID:evinw,项目名称:project_yess,代码行数:8,代码来源:ewupload10.php

示例2: initialize

 protected function initialize()
 {
     $this->db = new mysqli($this->options['db_host'], $this->options['db_user'], $this->options['db_pass'], $this->options['db_name']);
     parent::initialize();
     $this->db->close();
 }
开发者ID:cruni505,项目名称:prestomed,代码行数:6,代码来源:maraton_eqganador.php

示例3: sendFile

 public function sendFile($mediaType, $objectId)
 {
     App::uses('UploadHandler', 'Media.Vendor');
     $uploadHandler = new UploadHandler(null, false);
     $fileResonse = $uploadHandler->initialize(false);
     $userFile = $fileResonse['files'][0];
     $orig_fname = $userFile->name;
     $tmp_name = PATH_FILES_UPLOAD . $orig_fname;
     list($media_type) = explode('/', $userFile->type);
     if (!in_array($media_type, $this->Media->types)) {
         $media_type = 'bin_file';
     }
     $crop = false;
     $object_type = $mediaType;
     $object_id = $objectId;
     $path = pathinfo($tmp_name);
     $file = $media_type;
     $ext = '.' . $path['extension'];
     $data = compact('media_type', 'object_type', 'object_id', 'tmp_name', 'file', 'ext', 'orig_fname', 'crop');
     $id = $this->Media->uploadMedia($data);
     return $id;
 }
开发者ID:nilBora,项目名称:konstruktor,代码行数:22,代码来源:ApiController.php

示例4: MetadataHandler

<?php

/*
 * jQuery File Upload Plugin PHP Example 5.14
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */
error_reporting(E_ALL | E_STRICT);
require 'MetadataHandler.php';
require 'UploadHandler.php';
if (isset($_GET["action"]) && trim($_GET["action"]) === 'submissions') {
    $metadata_handler = new MetadataHandler();
    $allSubmissions = $metadata_handler->getAll();
    echo json_encode($allSubmissions);
} else {
    if (isset($_GET["action"]) && trim($_GET["action"]) === 'filesList' && isset($_GET["id"])) {
        $upload_handler = new UploadHandler();
        $upload_handler->initialize();
    } else {
        die('Not supported request.');
    }
}
开发者ID:whqiuyuan,项目名称:Open-Data-Submission,代码行数:27,代码来源:manager.php

示例5: Start

 /**
  * 	iUploaderHandler Methods
  */
 public function Start()
 {
     parent::initialize();
 }
开发者ID:ajayvaineela,项目名称:laravel-juploader,代码行数:7,代码来源:BaseUploadHandler.php

示例6: initialize

 protected function initialize()
 {
     parent::initialize();
     global $USER;
 }
开发者ID:Hawkart,项目名称:megatv,代码行数:5,代码来源:upload.php

示例7: initialize

 protected function initialize()
 {
     $this->db = conectabd(BD_PRINCIPAL);
     parent::initialize();
     $this->db->close();
 }
开发者ID:anderfilth,项目名称:Painel-Workapp,代码行数:6,代码来源:image_upload.php


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