Re: copy() not working
| From: | Burhan Khalid | Date: | Tue, 16 Nov 2004 14:32:53 +0000 |
| Subject: | Re: copy() not working | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202153@lists.php.net to get a copy of this message | ||
On Tue, 2004-11-16 at 14:58 +0100, Peter Lauri wrote:
> 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:
>
[ snipped ]
> 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).
Use move_uploaded_file() -- and read
http://www.php.net/manual/en/features.file-upload.php
--