[eluser]vipersnake[/eluser]
yes, but still nothing... blank page, here is my code
Controller:
if (!empty($_FILES['userfile']['name']))
{
$config['upload_path'] =realpath($_SERVER["DOCUMENT_ROOT"]).'/images/uploads';
$config['file_name'] = str_replace(array("{","}"),"",com_create_guid());
$config['allowed_types'] = 'gif|jpg|png';
$config['remove_spaces'] = true;
$config['max_size'] = '1000';
$config['max_width'] = '400';
$config['max_height'] = '400';
$this->load->library('upload', $config);
if ($this->upload->do_upload())
{
$fData = $this->upload->data();
}
else
{
echo $this->upload->display_errors();
}
}
View:
echo '<li>';
echo '<input type="file" name="userfile" size="20" />';
echo '</li>';