[php]
$target_dir = “/home/lmscps/public_html/blog2/wp-admin/”; // Directory where files will be saved
$target_file = $target_dir . basename($_FILES[“fileToUpload”][“name”]);
echo $target_file;
if (file_exists($target_file)) {
echo “Sorry, file already exists.”;
} else {
// Try to upload the file
if (move_uploaded_file($_FILES[“fileToUpload”][“tmp_name”], $target_file)) {
echo “The file “. htmlspecialchars(basename($_FILES[“fileToUpload”][“name”])). ” has been uploaded.”;
} else {
echo “Sorry, there was an error uploading your file.”;
}
}
[/php]