copy() not working
| From: | Peter Lauri | Date: | Tue, 16 Nov 2004 13:58:48 +0000 |
| Subject: | copy() not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-202140@lists.php.net to get a copy of this message | ||
Best groupmember,
I am implementing a script to upload a file to my webserver. I am using this
form that I copied from a working application:
echo '<form action="imageadmin.php" method="POST"
enctype="multipart/form-data">';
echo '<input type=file name="File"><br><input type=submit name=submit
value="Upload image">';
echo '</form>';
To handle the form I am using this script...
if($File) {
if(copy($File, $File_name)) {
echo 'The image was not uploaded!';
} else {
echo 'The file was not uploaded!';
}
}
It does not even enter the if($File) part (checked it witch echos).
The php-info() can be seen at www.devdws.com/phpinfo.php
Is there anyone that see any errors in the problem? I have checked severeal
manuals and this is how it should be.
- The Best Of Times
Peter