多次上传 Grocery CRUD 不起作用
Multiple upload of Grocery CRUD does not work
我需要上传多张图片,我看了很多文档都不起作用,我看到了这个:
我按照他们所说的做了所有事情,当我在我的视图中调用他们的控制器时 "multiuploader" 它工作正常,但是,当我在我自己的控制器中使用时不起作用。它将图像保存到数据库和文件夹中,但我看不到表单中的任何内容,例如添加中的图像或列表中的链接,即使我保存在相同的 table 之前与 "multiuploader".
如果你能帮助我,我将不胜感激。提前致谢。
这是我的控制器。
public function Test() {
$this->crud = new Grocery_CRUD_Multiuploader();
$this->crud->set_table('multi_uploader_gallery');
$this->crud->set_subject('Document');
$this->crud->fields("title", "my_pictures", "my_files", "my_mail_attachments");
$this->crud->columns("title", "my_pictures", "my_files", "my_mail_attachments");
$config = array(
/* Destination directory */
"path_to_directory" => 'assets/test',
/* Allowed upload type */
"allowed_types" => 'gif|jpeg|jpg|png',
/* Show allowed file types while editing ? */
"show_allowed_types" => true,
/* No file text */
"no_file_text" => 'No Pictures',
/* enable full path or not for anchor during list state */
"enable_full_path" => false,
/* Download button will appear during read state */
"enable_download_button" => true,
/* One can restrict this button for specific types... */
"download_allowed" => 'jpg'
);
$this->crud->new_multi_upload("my_pictures", $config);
$output = $this->crud->render();
$data['contents'] = 'contents';
$data = array_merge($data, (array) $output);
$this->load->view('template', $data);
}
in the view (add)
当我使用我的视图时,示例 table 没有显示任何错误,但是当我使用我的 table 时,它显示:
error in my view with the view (list)
我发现错误,我没有在路径的末尾放一个/,把那些问题都给我
"path_to_directory" => 'assets/test/',
至于之前的错误,我做了不同的测试,更改了 table 的名称,它们就消失了。
我也遇到了这个错误,它是由多上传列中已有的旧数据(未序列化)引起的。您必须将它们序列化或清空该字段。
我需要上传多张图片,我看了很多文档都不起作用,我看到了这个:
我按照他们所说的做了所有事情,当我在我的视图中调用他们的控制器时 "multiuploader" 它工作正常,但是,当我在我自己的控制器中使用时不起作用。它将图像保存到数据库和文件夹中,但我看不到表单中的任何内容,例如添加中的图像或列表中的链接,即使我保存在相同的 table 之前与 "multiuploader".
如果你能帮助我,我将不胜感激。提前致谢。
这是我的控制器。
public function Test() {
$this->crud = new Grocery_CRUD_Multiuploader();
$this->crud->set_table('multi_uploader_gallery');
$this->crud->set_subject('Document');
$this->crud->fields("title", "my_pictures", "my_files", "my_mail_attachments");
$this->crud->columns("title", "my_pictures", "my_files", "my_mail_attachments");
$config = array(
/* Destination directory */
"path_to_directory" => 'assets/test',
/* Allowed upload type */
"allowed_types" => 'gif|jpeg|jpg|png',
/* Show allowed file types while editing ? */
"show_allowed_types" => true,
/* No file text */
"no_file_text" => 'No Pictures',
/* enable full path or not for anchor during list state */
"enable_full_path" => false,
/* Download button will appear during read state */
"enable_download_button" => true,
/* One can restrict this button for specific types... */
"download_allowed" => 'jpg'
);
$this->crud->new_multi_upload("my_pictures", $config);
$output = $this->crud->render();
$data['contents'] = 'contents';
$data = array_merge($data, (array) $output);
$this->load->view('template', $data);
}
in the view (add)
当我使用我的视图时,示例 table 没有显示任何错误,但是当我使用我的 table 时,它显示:
error in my view with the view (list)
我发现错误,我没有在路径的末尾放一个/,把那些问题都给我
"path_to_directory" => 'assets/test/',
至于之前的错误,我做了不同的测试,更改了 table 的名称,它们就消失了。
我也遇到了这个错误,它是由多上传列中已有的旧数据(未序列化)引起的。您必须将它们序列化或清空该字段。