视频上传不工作YII [英] Video Uploading not working in YII

查看:156
本文介绍了视频上传不工作YII的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Yii中一个奇怪的isuue。

I have a strange isuue in Yii.

我们正在使用Yii与Android和iOS Web服务。在移动那里有视频上传页面。

We are using Yii for webservice with Android and IOS. In the mobile there have video uploading page.

这是使用Yii的上传视频code IAM:

This is the code iam using in Yii to upload video:

$file_path_image = "";
                $directory='images/Post';
                $file_path_video = "";
                $model = new TblCommunity();
                if(isset($_FILES['video'])){
                    $file = $_FILES['video'];
                    print_r($file);
                    $videoID = $model->getRandomString();
                    $video_obj = new VideoUpload();
                    $result = array();
                    $video_result_temp = $video_obj->upload($file, $videoID, $directory);
                    $result = CJSON::decode($video_result_temp);
                    if(isset($result['status']) && $result['status'] == 'failed'){                          
                        $result['response'] = array();
                        $result['status']='failed';
                        $this->_sendResponse(201, CJSON::encode($result));
                    } else {                                            
                        $file_path_video = Yii::app()->params['BASE_URL'].$result['Path'];                      
                    }
                }

以上code将小尺寸录像。

The above code will work for small size videos.

但是,当移动家伙开始上传大尺寸的以上5MB,我没有得到在Yii中的任何数据。

But when the mobile guys start to upload a big size or above 5MB , I didnt get any data in Yii.

它浪费我的一周充满了时间。

Its wasting my a week full of time.

,这是什么奇怪的行为的原因是什么?

What is the reason for this strange behaviour?

所有的帮助都是AP preciable。

All helps are appreciable.

在发送大尺寸的视频,在返回的Yii误差未定义指数视频

When sending large size video , the Yii returns error as Undefined index 'video'.

推荐答案

有可能是两个原因:


  1. 示范规则(最大文件大小)

  2. PHP /服务器设置(的upload_max_filesize,post_max_size要)

您是否已经检查吗?

这篇关于视频上传不工作YII的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆