Hi the following segment of code produces the error
"Notice: Undefined variable: root ...."
I have used this before on other servers but now I am on a shared server with php 5+
any thoughts welcome
---------code--------------------------
if( isset($_FILES['resume']) ){
$uploaddir = $root.'/files/attachment/';
$uploadfile = $uploaddir . basename($_FILES['resume']['name']);
if (move_uploaded_file($_FILES['resume']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
}





Bookmarks