I\'m trying to write some PHP to upload a file to a folder on my webserver. Here\'s what I have:
OMG
move_uploaded_file($_FILES['file']['tmp_name'], './' . $_FILES['file']['name']);
Don't do that. $_FILES['file']['name'] could be ../../../../boot.ini or any number of bad things. You should never trust this name. You should rename the file something else and associate the original name with your random name. At a minimum use basename($_FILES['file']['name']).