2013-02-11 71 views
1

我在上传视频文件时面临杂货店的问题。在上传过程中,它会在完成后显示过程映像,显示为空白并且视频文件不会上传。我已经为我的上传文件夹设置了777权限,并尝试上传mp4,flv,3gp文件格式。在杂货店上传视频crud

这是我的PHP代码

function test_video(){ 
    $crud=new grocery_CRUD(); 
    $crud->set_table('test'); 
    $crud->set_subject('Test Video'); 
    $crud->set_field_upload('url', 'assets/uploads'); 

    $output=$crud->render();   
    $this->_crud_output($output); 
} 

我的数据库结构

标题为varchar(50), URL文本

而且我已经给777权限的上传文件夹中。

感谢名单

+0

发布您的代码,看看它是否有错误 – ahmad 2013-02-11 16:16:02

回答

2

我也遇到了同样的问题,我所做的是增加在.htaccess中的PHP上传限制。

php_value upload_max_filesize 500M 

php_value post_max_size 400M 

,但我没有到此为止,现在上传后的“食品污物名单”显示视频作为一个文件链接, 所以我加了一列回呼,并集成一个播放按钮。

$crud -> callback_column('video_file_name', array($this, '_video_player')); 

function _video_player($value, $row) { 

    return "<a href='#' id='".$row -> video_id."' class='btn btn-sucess video_play'>Play</a>"; 
} 

希望你明白在说什么。