[eluser]Unknown[/eluser]
dear all..
i'm trying to get filename with extension..but it cant show..
where's the problem..
here's my code
Code:
$bin = rand(00,99);
$kode = 60;
$namabaru=$bin.$kode;
$config['file_name']=$namabaru;
$config['upload_path'] = 'uploads/usulan';
$config['allowed_types'] = 'doc|docx|xls|xlsx';
$this->load->library('upload', $config);
$result = $this->upload->data();
foreach ($result as $item => $value){
$filename = $result['file_name'];
$ext = $result['file_ext'];
if ( ! $this->upload->do_upload()) {
echo $this->upload->display_errors();
}
else{
echo $filename.$ext;
}
with this code, the result is only filename without extension. and if i type
theres only empty screen..