Welcome Guest, Not a member yet? Register   Sign In
extension filename cant show

dear all..
i'm trying to get filename with extension..but it cant show..
where's the problem..
here's my code
$bin = rand(00,99);
$kode = 60;
$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();
echo $filename.$ext;
with this code, the result is only filename without extension. and if i type
echo $ext;
theres only empty screen..

This is an old post, but for anyone stumbling on it... my guess here is that $this->upload->data() doesn't contain any information until AFTER the call to $this->upload->do_upload().

Theme © iAndrew 2016 - Forum software by © MyBB