The Form:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Upload a file</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1>Upload a File</h1>
<form action="uploadscript.php" method="post" enctype="multipart/form-data">
<label>Enter File Name</label><br />
<input type="file" name="img1" size="30" /><br />
<input type="submit" name="submit" value="Upload File" />
</form>
</body>
</html>
The Script
<?php
$uploaddir = '/tmp/';
$uploadfile = $uploaddir . basename($_FILES['img1']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['img1']['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>";
?>
It Says after parsing:
File is valid, and was successfully uploaded.
Here is some more debugging info:Array
(
[img1] => Array
(
[name] => bizfileform.wps
[type] => application/octet-stream
[tmp_name] => /tmp/phpqfjDWq
[error] => 0
[size] => 9216
)
)
😕 Now if everything was all good then it would be in my www.eriescene.com/tmp/ directory but it isn't I tryed various things with the directory and I still can't get it to do it. It doesn't show up no matter what I try to upload