I sit watching the code

$uploaddir = '/var/www/uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); 

What the / var / www /? I can not copy the temporary file just pointing to the directory / doc, why?

 $uploaddir = "doc/".$uniqe_id.".pdf"; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir)) { print "File is valid, and was successfully uploaded."; } 

How should I find out / var / www /?

  • Print $_SERVER['DOCUMENT_ROOT'] to start with, and dance from it. - u_mulder

0