Re[4]: [PHP4BETA] Upload file error!
| From: | php_list at citiz dot net | Date: | Mon, 29 May 2000 16:51:25 +0000 |
| Subject: | Re[4]: [PHP4BETA] Upload file error! | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-15879@lists.php.net to get a copy of this message | ||
Hello Andi,
Sunday, May 28, 2000, 9:39:47 AM, you wrote:
AG> Can you please cut this down to a minimal reproducing script.
AG> Something between 5-10 lines?
AG> Thanks,
AG> Andi
> AG> At 04:01 AM 5/28/00 -0700, php_list@citiz.net wrote:
> >>Hello php4beta,
> >>
> >> I upload some files in my website.
> >>
> >> The scripts can be work good in php 4.0.0 Release version, But in
> >> CVS version It return this messages;
> >>***************************************************************************
> >>****
> >>
> >> Warning: Unable to write to '/home/uploader/temp/1.zip': Bad file
> >> descriptor
> >> in /home/httpd/html/Upload.php3 on line 178
> >>
> >>***************************************************************************
> >>****
> >> line 178 is:
> >>
> >> copy($NewsFile,$Homedir.$NewsFile_name);
> >>
> >>I had already set:
> >>
> >> $Homedir = "/home/uploader/temp/";
> >> $NewsFile_name = "1.zip";
> >>
> >>Please help me fix it.
> >>
> >>sorry for my english so poor!
> >>
> >>--
> >>Best regards,
> >> php
> >>mailto:php_list@citiz.net
File line:
***********************************************************************
<form method="post" action="" enctype="multipart/form-data">
<input type="file" name="NewsFile">
<input type="submit" name="Send" value="Send">
<?
if ($NewsFile && $NewsFile != "none" && $Send == 'Send'){
copy($NewsFile,$Homedir.$NewsFile_name);
chmod($Homedir.$NewsFile_name,0666);
$Messages .= "Upload done!";
}
?>
<? echo $Messages; ?>
</form>
**********************************************************************
--
Best regards,
php mailto:php_list@citiz.net