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


PHP Video::add方法代码示例

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


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

示例1: video

 static function video($database, $plugins, $settings, $path, $albumID = 0, $description = '', $tags = '')
 {
     $size = filesize($path);
     $video = new Video($database, $plugins, $settings, null);
     $nameFile = array(array());
     $nameFile[0]['name'] = $path;
     $nameFile[0]['type'] = Video::getMimeType($path);
     $nameFile[0]['tmp_name'] = $path;
     $nameFile[0]['error'] = 0;
     $nameFile[0]['size'] = $size;
     if (!$video->add($nameFile, $albumID, $description, $tags)) {
         return false;
     }
     return true;
 }
开发者ID:thejandroman,项目名称:Lychee,代码行数:15,代码来源:Import.php

示例2: uploadVideo

 private function uploadVideo()
 {
     Module::dependencies(isset($_FILES, $_POST['albumID'], $_POST['tags']));
     $video = new Video($this->database, $this->plugins, $this->settings, null);
     echo $video->add($_FILES, $_POST['albumID'], '', $_POST['tags']);
 }
开发者ID:thejandroman,项目名称:Lychee,代码行数:6,代码来源:Admin.php

示例3: array

     if ($videoFileType != 'mp4') {
         $msg .= " Video is not an MP4 file. Please upload .mp4 files only.";
         $uploadOk = 0;
     }
     if ($uploadOk == 0) {
         $msg = "Sorry, your video was not uploaded. ERROR: " . $msg;
         $json = array("status" => 0, "msg" => $msg);
         $dbObj->close();
         //Close Database Connection
         header('Content-type: application/json');
         echo json_encode($json);
     } else {
         if (move_uploaded_file($_FILES["video"]["tmp_name"], $targetVideo)) {
             $msg .= "The file " . basename($_FILES["video"]["name"]) . " has been uploaded.";
             $status = 'ok';
             echo $videoObj->add();
         } else {
             $msg = " Sorry, there was an error uploading your video. ERROR: " . $msg;
             $json = array("status" => 0, "msg" => $msg);
             $dbObj->close();
             //Close Database Connection
             header('Content-type: application/json');
             echo json_encode($json);
         }
     }
 } else {
     $json = array("status" => 0, "msg" => $errorArr);
     $dbObj->close();
     //Close Database Connection
     header('Content-type: application/json');
     echo json_encode($json);
开发者ID:Mojolagbe2014,项目名称:mojoimipakiti,代码行数:31,代码来源:manage-videos.php


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