上传FLV视频文件到服务器的问题

发布于 2024-10-16 11:20:14 字数 651 浏览 1 评论 0原文

上传MP4视频时$_FILES数组是这样的..

    Array
    (
        [qqfile] => Array
            (
                [name] => video.mp4
                [type] => video/mpeg4
                [tmp_name] => /tmp/php74N9mR
                [error] => 0
                [size] => 199160
            )

    )

但是上传.FLV文件时$_FILES数组是这样的,为什么它不正确?

Array
(
    [qqfile] => Array
        (
            [name] => YouTube - My Youtube Contest Announcement.flv
            [type] => 
            [tmp_name] => 
            [error] => 1
            [size] => 0
        )

)

请建议。

while uploading MP4 video $_FILES array comes like this..

    Array
    (
        [qqfile] => Array
            (
                [name] => video.mp4
                [type] => video/mpeg4
                [tmp_name] => /tmp/php74N9mR
                [error] => 0
                [size] => 199160
            )

    )

But while uploading .FLV file $_FILES array coming like this , why it is not coming proper?

Array
(
    [qqfile] => Array
        (
            [name] => YouTube - My Youtube Contest Announcement.flv
            [type] => 
            [tmp_name] => 
            [error] => 1
            [size] => 0
        )

)

please suggest.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

∞琼窗梦回ˉ 2024-10-23 11:20:14

您尝试上传的文件太大。来自PHP 手册中有关文件上传的章节

自 PHP 4.2.0 起,PHP 返回适当的错误代码以及文件数组。错误代码可以在PHP上传文件时创建的文件数组的error段中找到。换句话说,错误可能会在 $_FILES['userfile']['error'] 中找到。

...

UPLOAD_ERR_INI_SIZE

值:1;上传的文件超出了 php.ini 中的 upload_max_filesize 指令。

The file you are trying to upload is too large. From the PHP manual's chapter on file uploads:

Since PHP 4.2.0, PHP returns an appropriate error code along with the file array. The error code can be found in the error segment of the file array that is created during the file upload by PHP. In other words, the error might be found in $_FILES['userfile']['error'].

...

UPLOAD_ERR_INI_SIZE

Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini.

哆啦不做梦 2024-10-23 11:20:14

我认为它与您上传的文件名有关,

当您调用 php 函数时,请用 '' 包装您的文件名

i think its related to the file name you upload ,

when you call to the php function wrap your file name with ''

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文