perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angus Lees <...@inodes.org>
Subject Re: uploading files results in an empty file
Date Fri, 28 Mar 2003 09:42:36 GMT
At Wed, 26 Mar 2003 16:41:30 -0800, Richard Schilling wrote:
> Using the following code to upload a file from a multipart 
> form with a file field in it:
> 
> [- 
> 
> if (defined $fdat{developmentmapfile}) {
> 
> 	open NF, "> /usr/local/apache/htdocs/images/$fdat
> {'developmentmapfile'}" or die $! . ": Can't open file $fdat
> {'developmentmapfile'}.";
> 	binmode NF;
> 	print NF $buffer while read ($fdat
> {developmentmapfile}, $buffer, 32768) or die $! . ": Can't 
> write to permanent file during upload.";
> 	close NF;
> }
> 
> -]
> 
> The images directory is set to owner nobody, and group nobody.
> 
> The file is created, but the code dies when it tries to print 
> to NF.  After the script dies, the file size is left at 0.  

and what error does $! indicate when it dies?

-- 
 - Gus

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message