简体   繁体   English

杂货店中的set_field_upload没有渲染

[英]set_field_upload in grocery crud not rendering

i am trying to use set_field_upload to upload a images in a database field called "photo", the crud is working perfectly for text/dates...etc 我正在尝试使用set_field_upload上传一个名为“photo”的数据库字段中的图像,这对于文本/日期等工作非常有效...等等

But u can't use the file upload 但是你不能使用文件上传

  • it's not showing as a file button, its only a text input. 它没有显示为文件按钮,它只是一个文本输入。
  • no errors in console or network. 控制台或网络中没有错误。
  • the field type is text, i tried varchar type as well with no luck. 字段类型是文本,我尝试varchar类型,没有运气。

Here is the code 这是代码

try {
    $crud = new grocery_CRUD();

    $crud->set_table('test');

    $crud->set_field_upload('photo', 'assets/uploads/files');

    $output = $this->grocery_crud->render();
    $this->_example_output($output);

    } catch(Exception $e) {
        show_error($e->getMessage().' --- '.$e->getTraceAsString());
    }

I solved the problem by changing the version, i tried 1.5.8 and 1.5.0. 我通过更改版本解决了问题,我尝试了1.5.8和1.5.0。

I got it working by using 1.5.5 我使用1.5.5开始工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM