I need help plz,
When i try to upload a file from Opera, IE, Firefox or any other borwser i get this message in the web console in Opera:
A PHP Error was encountered
Severity: Warning Message: fclose() expects parameter 1 to be resource, boolean given
Filename: libraries/grocery_crud.php
Line Number: 764
{"success":true,"file_name":null,"full_url":"http://localhost/joya/public/uploads/products/"}This is the code from grocerycrud.php:
line 762: fseek($temp, 0, SEEK_SET);
line 763: stream_copy_to_stream($temp, $target);
line 764: fclose($target);And this is my controller:
$crud->set_field_upload(‘image’, ‘public/uploads/products/’);
What i’m doing wrong?
PD: Excuse me for my poor english
Thanks
Check your config file if there is
$config['enable_query_strings'] = true;or
$config['allow_get_array'] = TRUE;.
The problem is that uploader works with $_GET and to your project is disabled. So perhaps this is the problem. What codeigniter version do you use? and what grocery CRUD?
Thanks for your fast replay,
I test in: CI 2.0.1 and 2.0.3 and i get the same issue in both versions
The grocery crud version is: Grocery CRUD v.1.1.0 for CI 2.0.0-2.0.3 and CI 1.7.x
this is my config file:
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = TRUE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in useThanks a lot for your support.
Greetings