Hello, I am using the following script to upload files to my server. Is there
anyway I can create a directory (on the fly) for the new image to go, as I want
people to be able to upload files with the same name.
Thanks
$uploadDir = 'uploads/';
$uploadFile = $uploadDir . $_FILES['form_data']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['form_data']['tmp_name'], $uploadFile))
{
print "File is valid, and was successfully uploaded. ";
# print "Here's some more debugging info:\n";
#print_r($_FILES);
}
else
{
print "File is invalid. ";
# print "Possible file upload attack! Here's some debugging info:\n";
# print_r($_FILES);
}
print "</pre>";