Ejemplo n.º 1
0
 function moveFile($original_name, $formvalues)
 {
     $dir = 'files/uploads';
     $filename = expFile::fixName(time() . '_' . $formvalues[$original_name]['name']);
     $dest = $dir . '/' . $filename;
     //Check to see if the directory exists.  If not, create the directory structure.
     if (!file_exists(BASE . $dir)) {
         expFile::makeDirectory($dir);
     }
     // Move the temporary uploaded file into the destination directory, and change the name.
     expFile::moveUploadedFile($formvalues[$original_name]['tmp_name'], BASE . $dest);
     return $dest;
 }