开发者

FLV video upload?

I use if($_FILE['type']['video/flv']) but it does not uplo开发者_StackOverflow社区ad it. Can anyone help me? I'll be thankful to you.


Don't rely on $_FILES['somefilefield']['type']. There are many reasons why a browser might fill it in with the 'wrong' media type. At best you can use the submitted type as an advisory for guessing what kind of file you've got, but you should never require it to match anything in particular.

In this case, most Windows desktops won't be set up to have any filetype association for the video/x-flv MIME type. So to Windows, a .flv file is nothing but an unknown binary file, and that's what it'll tell your server it's sending.


The mime type for flv is now 'video/x-flv', have a try.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜