Re: $_FILES doesn't work but $_POST works

From: Date: Wed, 31 May 2006 12:37:22 +0000
Subject: Re: $_FILES doesn't work but $_POST works
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-237145@lists.php.net to get a copy of this message
On 5/31/06, chris smith <dmagick@gmail.com> wrote:
On 5/31/06, kartikay malhotra <kartikay.malhotra@gmail.com> wrote: 2. Have you tried simply saving $_POST['userfile'] to a file?
     $save = $_POST['userfile'];
     $f=fopen($out,'a');
     copy($save, $out);
Files don't go into $_POST - they go into $_FILES.
Yes, his problem is that the $_FILES is not being set, but there is some value in $_POST['userfile']. Kartikay, I was suggesting that $_POST['userfile'] may contain the file itself, not a filename. What does $_POST['userfile'] contain? Try var_dump()ing it. Rabin

« previous php.general (#237145) next »