Re: Fw: upload
| From: | Harry Wiens | Date: | Wed, 25 Jun 2003 13:02:06 +0000 |
| Subject: | Re: Fw: upload | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-152756@lists.php.net to get a copy of this message | ||
this is working for me:
[snip]
$data = addslashes(fread(fopen($userfile, "r"), filesize($userfile)));
$fp = fopen($filename, "w");
fwrite($fp,stripslashes($data));
fclose($fp);
[/snip]
greets
harry wiens
"Jay Blanchard" <jay.blanchard@niicommunications.com> schrieb im Newsbeitrag
news:C8F323573C030A448F3E5A2B6FE2070B0101F86D@nemesis...
[snip]
this is the form that i have
<form action="archivo2.php" method="post"
enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="50000">
Send this file:
<input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
and this is the script for upload
$Archivo = $HTTP_POST_VARS['userfile'];
copy($Archivo,"Archivos/".$Archivo);
but it doesnt work .....
[/snip]
See TFM at http://us3.php.net/manual/en/features.file-upload.php
HTH