Hello Everyone!
I am unable to upload fiels using Code Igniter framework.
I have one form with the help of it need to upload 4 images in fabrics folder each time.
Before uploading images I need to create folder sructure also but unable to do so by giving absolute path like
mkdir(ADMIN_DATA."uploaded/shirt/parts/".$fabric_type, 0777).
Was able to create folder with the path like
mkdir("C:/xampp/htdocs/project/admin_data/uploaded/shirt/parts/".$fabric_type, 0777)
Also images was going correctly while adding on local system.
I want to do it on test server instead on local system so I did changes of mkdir(ADMIN_DATA."uploaded/shirt/parts/".$fabric_type, 0777) which made me unable to make folders ,also unable to upload images .
$config['upload_path'] = ADMIN_DATA.'uploaded/shirt/fabrics/';
$config['allowed_types'] = 'gif|jpg|png';
$this->load->library('upload', $config);
if (!$this->upload->do_upload('short_image'))
{
// echo "warning";
$_FILES['short_image']['type']='application/png';
$error = array('error' => $this->upload->display_errors());
$this->load->view('admin/pdflist', $error);
}
else
{
$data1 = array('upload_data' => $this->upload->data());
print_r($data);
}
After uploading images it gives below error:
An Error Was Encountered
Unable to load the requested file: admin/pdflist.php
Any help would be appreciated!
Thanks.