I'm testing a file upload script on localhost with apache 1.3.27 on windows xp.
This is my form:
<form enctype="multipart/form-data" action="upload.php" method="post">
file: <input type="file" name="userfile" size="30"><br>
<input type="submit" value="Send">
</form>
This is my script:
$tempname = $FILES['userfile'];
if( is_uploaded_file( $tempname ) )
{
if( move_uploaded_file( $FILES['userfile']['tmp_name'],$SERVER['DOCUMENT_ROOT'].'/docs/uploads/'.$FILES['userfile']['name'] ) )
echo 'SUCCESS';
}
But It doesn't seem to upload the file. Well, first of all, where should the uploaded file be located?
Is my script ok?
Please help,
Thanks!!