I currently have the following:
我目前有以下内容:
if (in_array($_FILES['userfile']['type'], $mimeTypes))
{
$target_path = "./uploads/{$_SESSION['email']}";
$target_path = $target_path . basename( $_FILES['userfile']['name']);
if(move_uploaded_file($_FILES['userfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['userfile']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}