<?php
if(isset($_POST['upload-movies']))
{
$uploaddir = '/var/www/movie/movies/';
$uploadfile = $uploaddir . basename($_FILES['movieVideoFile']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['movieVideoFile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
echo 'Here is some more debugging info:';
print_r($_FILES);
print "</pre>";
}
?>
chmod 777 /var/www/movie/movies