<?php
// function to upload a file to a directory
function save_to_disk$http_file ) {
    
//set your own server_www_base and/or directory if necessary
    
global $server_www_base$dir;

    
$fileHandle fopen$http_file'tmp_name' ], "r" );
    
$data fread$fileHandle$http_file'size' ] );

    
// hash the $data to make unique directories...if needed
    
$hash md5$data );
    
$uploaddir $_SERVER'DOCUMENT_ROOT' ] . $server_www_base '/' $dir '/' $hash '/';
    
$uploaddir str_replace'//' '/'$uploaddir );

    
// if it hasn't already been created, create the directory and set permissions
    
if( ! file_exists$uploaddir ) ) mkdir$uploaddir0755);
    
$uploadfile $uploaddir basename$http_file'name' ] );
    
$fileHandle fopen($uploadfile"wb" );
    
fwrite$fileHandle$data );
}

//usage
//save_to_disk( $_FILES[ 'filetoupload' ] );

?>
 back to the menu  download  try out this script 
(note: some scripts won't run from this location)