CodeIgniter Forums

Full Version: You did not select a file to upload.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
$uploadDirectory = 'd:\\wamp\\www\\CI_inGrow\\uploads';
if( set_realpath($uploadDirectory, TRUE)){
}
$config['upload_path'] = $uploadDirectory;
$config['allowed_types'] = 'gif|jpg|png';
//$config['max_size'] = '';
//$config['max_width'] = '1024';
//$config['max_height'] = '768';
//$config['remove_spaces'] = true;

$this->load->library('upload', $config);
$this->upload->do_upload();
$imageArray = $this->upload->data("txtQuestionImage");
print_r($this->upload->display_errors());
print_r($imageArray);
print_r($_POST);
print_r($_FILES);




Please help me solve this.....


output:

You did not select a file to upload.
http://localhost/CI_inGrow/Array ( [file_name] => [file_type] => [file_path] => d:\wamp\www\CI_inGrow\uploads/ [full_path] => d:\wamp\www\CI_inGrow\uploads/ [raw_name] => [orig_name] => [client_name] => [file_ext] => [file_size] => [is_image] => [image_width] => [image_height] => [image_type] => [image_size_str] => ) Array ( [intQuestionID] => [intLevelID] => 17 [level1] => 7 [level2] => 12 [lngtxtquestion] => test [lngtxtQuestionDirection] => test [enumDifficulty] => easy [saveQuestion] => Save ) Array ( [txtQuestionImage] => Array ( [name] => 264960_228777097153309_188163147881371_739043_1418472_n.jpg [type] => image/jpeg [tmp_name] => D:\wamp\tmp\phpCFF6.tmp [error] => 0 [size] => 75709 ) )