Re: UPLOADING IMAGE
| From: | 1LT John W. Holmes | Date: | Sat, 25 May 2002 21:21:53 +0000 |
| Subject: | Re: UPLOADING IMAGE | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99268@lists.php.net to get a copy of this message | ||
Give a destination file name, not just the directory. You don't have to
unlink($file), it's done automatically when the script ends.
---John Holmes...
----- Original Message -----
From: "Dani" <universal2001@iprimus.com.au>
To: <php-general@lists.php.net>
Sent: Saturday, May 25, 2002 7:58 PM
Subject: [PHP] UPLOADING IMAGE
> What's wrong with my code?
>
> <?php
> if($file)
> {
> print("file name :$file_name<P>\n");
> if (copy($file,"http://sarjito/img/"))
> {
> print("file uploaded");
> }
> unlink($file);
> }
> ?>
>
> Any advise is welcome.
>
> Thanks,
> Dani
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>