$_POST['name'],'type'=>$_POST['type'],'date'=>date("d/m/Y"), 'file'=>$distortedfile); $handle=fopen('../uploads/5/index.jsons','a'); fwrite($handle,json_encode($item)."\n"); fclose($handle); print $success ? $distortedfile : 'Unable to save the file.'; ?>