Codice PHP:
<?php
//istanzia var timestamp
$today date("Ymdhms");
$todays="ppp";
//se non esiste,crea la directory (attivare i permessi di scrittura!)

if(!is_dir("./files".$today)) mkdir("./files".$today0755);

//trasferisce il file uploadto
move_uploaded_file($_FILES['Filedata']['tmp_name'], "./files$today/".$_FILES['Filedata']['name']);

//permessi scrittura

chmod("./files$today/".$_FILES['Filedata']['name'], 0777);
?>