Re: Upload not working...
| From: | zareef ahmed | Date: | Wed, 08 Sep 2004 05:25:02 +0000 |
| Subject: | Re: Upload not working... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196103@lists.php.net to get a copy of this message | ||
--- "Deependra b. Tandukar" <deepndra@icimod.org.np>
wrote:
> I tried this form to upload a file.
>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1" />
> </head>
>
> <body>
> <form action="./upload.php" method="post">
you should define enctype
> <input type="file" name="userfile">
> <input type="submit" value="upload">
> </form>
>
> </body>
> </html>
>
> with the following code:
>
> <?php
> copy($userfile,
> "/var/www/html/upload/data/$userfile_name");
> unlink($userfile);
> ?>
I think you should read about $_FILES array and
move_uploaded_file.
http://in.php.net/features.file-upload
http://in.php.net/move_uploaded_file
>
> and am getting the message "Warning: Unable to open
> '\"C:\\Documents and
>
Settings\\Administrator\\Desktop\\photos\\IMAGE0099.JPG\"'
> for reading: No
> such file or directory in
> /var/www/html/ICIweb/php/upload.php on line 2"
>
> This very code works in my home computer. I tried
> this with my local server
> at my office and my web server, both give the same
> message what is the
> wrong with it.
>
> DT
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
=====
Homepage :: http://www.zasaifi.com
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail