當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。