RE: [PHP-WIN] uploading files
| From: | Flint Doungchak | Date: | Wed, 29 Nov 2000 18:18:54 +0000 |
| Subject: | RE: [PHP-WIN] uploading files | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-4175@lists.php.net to get a copy of this message | ||
PHP might now have the permissions to the temp directory as specified in the
php.ini file. That's what happened to me.
-Flint
-----Original Message-----
From: afan [mailto:afan@sprout.net]
Sent: Wednesday, November 29, 2000 1:14 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] uploading files
Hi everybody,
I tried an exsample from a book:
"...
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php
if(isset($userfile))
{
echo"name: $userfile<br>";
echo"original name: $userfile_name<br>";
echo"size: $userfile_size<br>";
echo"type: $userfile_type<br>";
if(copy($userfile, "c:\\tests\\upload.txt"))
{
echo"File successfully copied!";
}
else
{
echo"Error: failed to copy file...";
}
unlink($userfile);
}
else
{
?>
<form method="post" action="upload-file.php3"
enctype="multipart/form-data">
<input type="File" name="userfile"><br>
<input type="Submit" name="submit" value="Upload">
</form>
<?php
}
?>
</body>
</html>
..."
but I'm getting error message:
"...
name: \\php2
original name: tempbot1.txt
size: 3
type: text/plain
Warning: Unable to open '\\php2' for reading: No such file or directory in
D:\tests\upload-file.php3 on line 15
Error: failed to copy file...
Warning: Unlink failed (No such file or directory) in
D:\tests\upload-file.php3 on line 23
..."
What I'm doing wrong?!?
Thanks