That was just an example.
When I upload files, generally image files, I assign a name to the file, usually a random name of sorts, as the file goes into a directory with other files that have been uploaded, in order to give it a different name, I assign something to it. Hence the idea of the $filename attribute.
The .txt was just an example if you were using a text file for an upload, but it can be anything.
-- Jason