foreach ($files as $file){

bu satirin bir üstüne

print_r($files);exit; yazıp sonucu gösterebilirmisni