【问题标题】:How to save files in my local directory using ScriptCam?如何使用 ScriptCam 将文件保存在我的本地目录中?
【发布时间】:2015-10-25 01:06:06
【问题描述】:

我已尝试按照 www.scriptcam.com 和 How to save files in my server with ScriptCam plugin 的步骤进行操作。 如下脚本:

function fileReady(fileName) {
    $('#recorder').hide();              
    $('#message').html('This file is now dowloadable for five minutes over 
                <a href='+fileName+'>here</a>.');
    var x=fileName;

    if (x != null){
    $.post('ack.php', {x: x}, function(){
        //successful ajax request
    }).error(function(){
        alert('error... ohh no!');
    });

}

var fileNameNoExtension=fileName.replace(".mp4", "");
jwplayer("mediaplayer").setup({
    width:320,
    height:240,
    file: fileName,
    image: fileNameNoExtension+"_0000.jpg"
});

$('#mediaplayer').show();
}
在我的 ack.php 脚本中,如下所示:

ack.php
$val=$_POST['x'];

$file = $val; 
$newfile = 'video/output.mp4'; 

if (!copy($file, $newfile)) { 
    echo "failed to copy $file...\n"; 
} 

但文件没有存储在我的“视频”文件夹中,有什么解决办法?

【问题讨论】:

    标签: javascript php jquery video-streaming video-recording


    【解决方案1】:

    1. 将您的 ack.php 和 video 文件夹保存在同一个文件夹中。 2.查看您是否已授予(读/写文件)视频文件夹的权限 3.如果没有,那么您可以通过转到其属性来提供它 4.然后试一试 5. 我在我的服务器上做了同样的事情并获得了成功。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-24
      • 2020-08-25
      • 1970-01-01
      • 1970-01-01
      • 2022-11-17
      • 1970-01-01
      • 1970-01-01
      • 2017-09-22
      相关资源
      最近更新 更多