On DevShed today, there's a new article in their series looking at creating custom functions to handle file uploads in your application:
I'm going to show you how to wrap the file uploading application built in the previous article of the series into a single custom PHP function. This will turn it into a more maintainable and reusable piece of code.
They review the source built in previous parts of the series and show how to update it with a uploadFile() function that takes all of the logic from before (exceptions and all) and wraps it up into a nice little package that can be reused anywhere.