problem with file upload script
| From: | AMC | Date: | Mon, 27 Sep 2004 19:03:14 +0000 |
| Subject: | problem with file upload script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-197989@lists.php.net to get a copy of this message | ||
Hi,
Here is a script I'm using to upload files. Can anyone see anything wrong
with it? No file is uploaded when I click the upload button
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body>
<?php
echo $_FILES['file']['tmp_name'];
echo $_FILES['file']['name'];
move_uploaded_file("{$_FILES['file']['tmp_name']}",
"{$_FILES['file']['name']}");
?>
<form method="post" action="test.php" ID="Form1"
enctype="multipart/form-data">
<b>Browse for file to upload:</b><input type="file" name="file"
ID="File1"/><br/>
<input type="submit" value="Upload!" ID="Submit1"
NAME="Submit1">
</form>
</body>
</html>