[eluser]alrightythen[/eluser]
[quote author="Too Pixel" date="1265158329"]The code should still be correct. It is more likely that you must check your upload path, maybe not using the realpath as I did.[/quote]
Oh hi, a reply from the master himself.
Yes I've tried realpath($upload_dir) and base_url().$upload_dir but neither one of them work
With this code..
Code:
foreach($_FILES as $key => $value)
{
if( ! empty($value['name']))
{
if( ! $CI->upload->do_upload($key))
{
/* there's something wrong going on here! */
$data['upload_message'] = $CI->upload->display_errors();
echo 'echo upload_message';
echo $data['upload_message'];
echo '<br/><br/>';
echo 'echo upload_path<br/>';
echo $config['upload_path'];
echo '<br/><br/>';
$errors = TRUE;
}
else
{
// Build a file array from all uploaded files
$files[] = $CI->upload->data();
}
}
}
I get..
echo upload_message
The upload path does not appear to be valid.
echo upload_path
/Applications/MAMP/htdocs/costa/uploads
while the
$upload_dir = 'uploads'
I'm calling the function like this..
Code:
$this->load->library('upload');
if(!$files = $this->upload->multiple_upload())
{
echo 'Something went wrong during upload';
}
else
{
echo 'Upload success !<br />';
echo '<pre>';
print_r($files);
echo '</pre>';
}