public function processUploadedFile($originalFile, $newFile, $folder)
    {
        if (substr($folder, -1) != '/') $folder = $folder . '/';
        @move_uploaded_file($originalFile, $folder . $newFile) or die("File: '{$originalFile}' couldn't be moved '{$folder}'.");
        @chmod($folder . $newFile, 0777) or die("Error with chmod() function on file: '{$newFile}' in folder '{$folder}'.");
    }
public function processUploadedFile($originalFile, $newFile, $folder)
    {
        if (substr($folder, -1) != '/') $folder = $folder . '/';
        @move_uploaded_file($originalFile, $folder . $newFile) or die("File: '{$originalFile}' couldn't be moved '{$folder}'.");
        @chmod($folder . $newFile, 0777) or die("Error with chmod() function on file: '{$newFile}' in folder '{$folder}'.");
    }
public function processUploadedFile ( $ originalFile , $ newFile , $ folder ) { if ( substr ( $ folder , - 1 ) != '/' ) $ folder = $ folder . '/' ; @ move_uploaded_file ( $ originalFile , $ folder . $ newFile ) or die ( "File: '{$originalFile}' couldn't be moved '{$folder}'." ) ; @ chmod ( $ folder . $ newFile , 0777 ) or die ( "Error with chmod() function on file: '{$newFile}' in folder '{$folder}'." ) ; }
Process an uploaded file and moved to a folder on the server

@param string $originalFile The original file inside the temporary folder
@param string $newFile The new name for the file
@param string $folder The folder where the file has to go
Process an uploaded file and moved to a folder on the server