problem in uploading FLV video file to server

1.1k Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

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.

0
On

i think its related to the file name you upload ,

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